Rest Python Module

Class for the archive interface.

Allows API to file interactions for passed in archive backends.

class pacifica.archiveinterface.rest_generator.ArchiveInterfaceGenerator(archive)[source]

Archive Interface Generator.

Defines the methods that can be used on files for request types.

DELETE(filepath)[source]

Delete a file from WSGI request.

Delete the file specified in the request to disk.

GET(*args, **kwargs)[source]

Get a file from WSGI request.

Gets a file specified in the request and writes back the data.

HEAD(filepath)[source]

Get the file status from WSGI request.

Gets the status of a file specified in the request.

PATCH(filepath)[source]

Move a file from the original path to the new one specified.

POST(filepath)[source]

Stage a file from WSGI request.

Stage the file specified in the request to disk.

PUT(filepath)[source]

Write a file from WSGI requests.

Writes a file passed in the request to the archive.

__init__(archive)[source]

Create an archive interface generator.

static _byte_range_get(archivefile, byte_range)[source]

Perform a byte range get and return generator.

exposed = True
pacifica.archiveinterface.rest_generator.error_page_default(**kwargs)[source]

The default error page should always enforce json.