Simple File Repository
A simple file and photo repository. Underlying storage is a filesystem or a S3-compatible service.
Installation
pip install simple_file_repository
Usage
File storage
>>> import uuid
>>> from simple_file_repository import FileStorage
>>> storage = FileStorage(storage_directory='/tmp/repo', database='cats')
>>> storage.store(b'content')
UUID('72fc4a76-1ab7-4d60-9f6a-94aa0ad45b5b')
>>> storage.get(uuid.UUID(hex='72fc4a76-1ab7-4d60-9f6a-94aa0ad45b5b'))
b'content'
>>> list(storage.list())
['72fc4a76-1ab7-4d60-9f6a-94aa0ad45b5b']
Photo storage using S3
from simple_file_repository import PhotoStorages
storages = PhotoStorages()
storages.init_app(names=['cats', 'dogs'],
storage_directory='/tmp/repo',
names_for_s3=['cats'],
imagemagick_convert='/usr/bin/convert',
access_key_id='',
secret_access_key='',
region='us-east-1', bucket='my-s3-bucket')
storages['cats'].store(b'image')
License
MIT
Release files for simple-file-repository 0.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simple_file_repository-0.11.0.tar.gz | 8.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_file_repository-0.11.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.5 kB
Release files / simple_file_repository-0.11.0.tar.gz
| Download URL | simple_file_repository-0.11.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b43c0e70a61ffb59b44770351bd01a28bb4c3e9752ea28c6914d110bab8b5be
|
|
BLAKE2b-256 checksum How to use checksums |
8b8640dd2f8fe2950344040aa12d80635a3dbf9c16d39ada0a0cb36e30b02d38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 25, 2025.
Transparency logRelease files / simple_file_repository-0.11.0-py3-none-any.whl
| Download URL | simple_file_repository-0.11.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21c8ed9ebd9942c1b782c5946b650a5ed4339c3afde5f618ad0576bf048d6051
|
|
BLAKE2b-256 checksum How to use checksums |
82a9ecdb34a2bdc5287decf272fa45ecb8d6be3b37e1d75a6c697ea8857d8783
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 25, 2025.
Transparency log