API reference

ltdconveyor Package

Classes

ConveyorError

Generic base exception class for ltdconveyor.

ltdconveyor.fastly Module

Management of Fastly CDN caching.

See https://docs.fastly.com/api for background.

Functions

purge_key(surrogate_key, service_id, api_key)

Instant purge URLs with a given surrogate key from the Fastly caches.

Classes

FastlyError

Error related to Fastly API usage.

ltdconveyor.keeper Package

Classes

KeeperError(message[, status_code, body])

Error raised because of issues using the LTD Keeper API.

ltdconveyor.s3 Package

Functions

copy_dir(bucket_name, src_path, dest_path[, ...])

Copy objects from one directory in a bucket to another directory in the same bucket.

delete_dir(bucket_name, root_path[, ...])

Delete all objects in the S3 bucket named bucket_name that are found in the root_path directory.

create_dir_redirect_object(bucket_dir_path, ...)

Create an S3 object representing a directory that's designed to redirect a browser (via Fastly) to the index.html contained inside that directory.

upload_dir(bucket_name, path_prefix, source_dir)

Upload a directory of files to S3.

upload_file(local_path, bucket_path, bucket)

Upload a file to the S3 bucket.

upload_object(bucket_path, bucket[, ...])

Upload an arbitrary object to an S3 bucket.

open_bucket(bucket_name[, ...])

Open an S3 Bucket resource.

Classes

S3Error

Error related to AWS S3 usage.

ObjectManager(session, bucket_name, bucket_root)

Manage objects existing in a bucket under a specific bucket_root.

ltdconveyor.s3.presignedpost Module

S3 Upload client using presigned POST URLs generated by the LTD Keeper server application.

For more information about S3 presigned POST URLs, see https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-presigned-urls.html#generating-a-presigned-url-to-upload-a-file

Functions

prescan_directory(base_dir[, _current_dir])

Make a list of all directories in a site, including the root directory.

upload_dir(*, post_urls, base_dir[, ...])

Upload a local directory of files to S3 for an LSST the Docs build.

upload_file(*, local_path, post_url, post_fields)

Upload a file using a presigned POST URL to S3.

upload_directory_objects(*, post_urls)

Upload directory redirect objects for an LSST the Docs product build.