Skip to main content

s3vault

A library for storing documents in AWS s3

Before you start

For best results, create a bucket with the following settings:

  • Encryption on
  • Versioning on

Installation

pip install s3vault

Environment variables

The following environment variables can optionally be provided:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_S3_REGION_NAME

Usage

from s3vault.vault import Vault
vault = Vault(bucket, owner_id, collection)

You can also provide aws_access_key_id, aws_secret_access_key and aws_s3_region_name, otherwise if will default to the values in the environment variables above.

Upload a file from a url

vault.upload_from_url(url, filename, extension='pdf')
  • url: the url to fetch the file to store from
  • filename the Key at which to store the object. Convention: :collection/:owner_id/:object_id

TODO: this method should use the same convention as the below methods to enforce consistency

Get a file

vault.get_object(object_id)
vault.get_versions(object_id)

Metadata

Release files for s3vault 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for s3vault 0.1.1
File Size Uploaded Provenance
s3vault-0.1.1.tar.gz 2.9 kB Without provenance Details

Release files / s3vault-0.1.1.tar.gz

Download URL s3vault-0.1.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0aaeb3bb26404912e4583b4afe65ad1de4edcd618904ce4f80857a0188f95595
BLAKE2b-256 checksum
How to use checksums
cbc3faea3f4d8615320c299cd8d8df094ce1355209dd37f3a473122745ce5056
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Security for s3vault 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page