Skip to main content

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

flaxon_s3-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flaxon_s3-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

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

Hashes for flaxon_s3-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fcf0bd18dcdc4d8d0f1132cea7f0f306a06a793250979415b5d782793b3c5eb1
MD5 73cbf2707cddc7a199e849418aca0106
BLAKE2b-256 bbb63331cd176b4ced5970c6bd574df406c2bf73179f2d30ee1043456eded29d

See more details on using hashes here.

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

Hashes for flaxon_s3-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4671940364397a2c0c3edfb9a575eeebb9324ba54a71373c311342d5d54fe500
MD5 a32e4bb9bd5315bb922589079dd37315
BLAKE2b-256 0a816e453868042a4cad241a662762713a5d1d9640ae04ea4645ab0a3487d621

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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