Flaxon S3
flaxon-s3 gives Flaxon applications access to Amazon S3-compatible object
storage, including services that expose the S3 API through a custom endpoint.
The configured storage service is available at app.state.s3.
Install
pip install flaxon-s3
Use
import os
from flaxon import Flaxon
from flaxon_s3 import S3Plugin
app = Flaxon("uploads")
await app.plugins.load_plugin(
S3Plugin(
bucket="uploads",
region_name="us-east-1",
endpoint_url=os.environ.get("S3_ENDPOINT_URL"),
)
)
@app.post("/files")
async def upload_file(request):
body = await request.body()
app.state.s3.upload_bytes("incoming/report.pdf", body, content_type="application/pdf")
return {"key": "incoming/report.pdf"}
Provide credentials through the standard AWS credential provider chain or your deployment's secret manager. The plugin deliberately does not make buckets public or infer authorization. Keep object keys server-controlled, enforce content limits before reading uploads, and scope IAM permissions to the needed bucket and actions.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flaxon_s3-0.1.0.tar.gz.
File metadata
- Download URL: flaxon_s3-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcf0bd18dcdc4d8d0f1132cea7f0f306a06a793250979415b5d782793b3c5eb1
|
|
| MD5 |
73cbf2707cddc7a199e849418aca0106
|
|
| BLAKE2b-256 |
bbb63331cd176b4ced5970c6bd574df406c2bf73179f2d30ee1043456eded29d
|
File details
Details for the file flaxon_s3-0.1.0-py3-none-any.whl.
File metadata
- Download URL: flaxon_s3-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4671940364397a2c0c3edfb9a575eeebb9324ba54a71373c311342d5d54fe500
|
|
| MD5 |
a32e4bb9bd5315bb922589079dd37315
|
|
| BLAKE2b-256 |
0a816e453868042a4cad241a662762713a5d1d9640ae04ea4645ab0a3487d621
|