Skip to main content

A binary data persistence layer built on top of persisty

Project description

Persisty Data

This is an addition to the persisty framework for handling binary data (File Uploads). The objective is to be compatible with third party services, including ones that use signed URLs for posting / reading (Such as S3).

Concepts

  • DataItems represent the storage of binary data, with methods for reading and writing as well as obtaining meta such as file size, last modified and etag
  • DataStores store data items, with higher level methods for copying efficiently
  • DataStoreFactories handle authorization when creating create data stores, as well as providing methods for generating presigned urls meaning that the server may be bypassed completely in some implementations (such as S3)

Implementations

Chunk

The chunk implementation breaks up an item into chunks smaller than preset size and storing these using regular persisty.

Directory

The Directory Store stores data items as files within a directory on a hosted file system.

S3

The S3 Store stores data items as entries in an S3 bucket. It is unique in the stock implementations in that it also provides an S3 Data Store Factory rather than relying on the Hosted Data Store Factory used by other implementations for providing pre-signed read urls and Upload Forms.

  • Reading Data
  • Writing data
  • Strategy for bypassing server using Signed URLs
  • Example

Example

A variant of the persisty messenger example application demonstrates file upload.

Installing local development dependencies

python setup.py install easy_install "persisty-data[dev]"

Release Procedure

status

The typical process here is:

  • Create a PR with changes. Merge these to main (The Quality workflows make sure that your PR meets the styling, linting, and code coverage standards).
  • New releases created in github are automatically uploaded to pypi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

persisty-data-0.0.3.tar.gz (28.2 kB view hashes)

Uploaded Source

Built Distribution

persisty_data-0.0.3-py3-none-any.whl (42.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page