simple_module_file_storage
Pluggable file-upload + storage module for simple_module apps. Defaults to local-disk storage for development; install the [s3] extra to switch to any S3-compatible backend via aioboto3.
Install
# local-disk storage (dev default)
pip install simple_module_file_storage
# S3-compatible storage (production)
pip install "simple_module_file_storage[s3]"
What it provides
POST /api/file-storage/uploadmultipart upload endpoint.GET /api/file-storage/files(paged list),GET /api/file-storage/files/{file_id}(metadata),GET /api/file-storage/files/{file_id}/download(signed-URL redirect or stream),DELETE /api/file-storage/files/{file_id}.- Pluggable backend selected by the
backendsetting (filesystemdefault |s3); third-party backends can register under any id. - Settings (
backend,s3_bucket,s3_region,s3_endpoint_urlfor R2/MinIO/etc.,s3_access_key_id,s3_secret_access_key,s3_presign_ttl_seconds) are configured from the DB settings store via the admin UI — they are not read fromSM_FILE_STORAGE_*environment variables at runtime.
Usage
From another module, inject the service via its dependency:
from fastapi import Depends, File, UploadFile
from file_storage.deps import get_file_storage_service # type: ignore[import-not-found]
from file_storage.service import FileStorageService # type: ignore[import-not-found]
async def attach_receipt(
upload: UploadFile = File(...),
svc: FileStorageService = Depends(get_file_storage_service),
):
record = await svc.upload(upload)
return {"file_id": record.id}
Backend and S3 credentials are configured from the admin UI at /settings/modules → FileStorage (DB-backed settings); switch backend to s3 and fill in s3_bucket, s3_region, s3_endpoint_url (for MinIO/R2), s3_access_key_id, and s3_secret_access_key.
Depends on
simple_module_core,simple_module_db,simple_module_hosting,simple_module_settingsaiofiles- Optional:
aioboto3(install the[s3]extra)
License
MIT — see LICENSE.
Metadata
Release files for simple-module-file-storage 0.0.37
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| simple_module_file_storage-0.0.37.tar.gz | 136.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_module_file_storage-0.0.37-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 251.1 kB
Release files / simple_module_file_storage-0.0.37.tar.gz
| Download URL | simple_module_file_storage-0.0.37.tar.gz |
|---|---|
| Size | 136.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
433bab99417d7105851bfb95bda040153f4467837f0fd0f071b1718b5d036a6c
|
|
BLAKE2b-256 checksum How to use checksums |
ab8e504da6a1dee7d0be27010bd9db599b28393dfcd62c3e6101dd9396f2a7f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logRelease files / simple_module_file_storage-0.0.37-py3-none-any.whl
| Download URL | simple_module_file_storage-0.0.37-py3-none-any.whl |
|---|---|
| Size | 114.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71e76fdea8edfc2d46e036df3db13f16cab5f1b78f8c60f5fd5edfc8bc82c7ee
|
|
BLAKE2b-256 checksum How to use checksums |
d18a4a5edd85a865312302c8624a3dc7acee3927742b1a4ab1848445819ad4e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logSecurity for simple-module-file-storage 0.0.37
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for simple_module_file_storage-0.0.37.tar.gz
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 Oct 19, 2026.
Transparency logA 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.