Build FastAPI service wrapping minio-sdk operations #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Repo
forgejo_admin/minio-apiLineage
plan-minio-mobile→ Phase 2 → Phase 2a (FastAPI Routes)User Story
As a frontend developer
I want a JSON REST API that wraps all MinIO S3 operations
So that I can build a mobile UI without dealing with S3 XML, Signature V4, or MinIO credentials in the browser
Context
The minio-sdk (v0.1.0,
forgejo_admin/minio-sdk) provides a Python client for MinIO's S3 API with custom Signature V4 signing. This service wraps it as a FastAPI REST API with JSON request/response. No auth in this phase — that's Phase 2b. This ships as a tailnet-only service first.The SDK is published to Forgejo PyPI. Install it as a dependency:
pip install minio-sdk --index-url https://forgejo.tail5b443a.ts.net/api/packages/forgejo_admin/pypi/simple/Key decisions:
MinioClientfrom the published package, don't copy code/docs(Swagger UI) and/openapi.jsonfor freeFile Targets
Files to create:
src/minio_api/__init__.py— package initsrc/minio_api/main.py— FastAPI app, lifespan, MinioClient initializationsrc/minio_api/routes/buckets.py— bucket CRUD routessrc/minio_api/routes/objects.py— object CRUD + list routessrc/minio_api/routes/presign.py— presigned URL generation routessrc/minio_api/routes/multipart.py— multipart upload routessrc/minio_api/schemas.py— Pydantic models for request/responsesrc/minio_api/dependencies.py— shared dependencies (MinioClient instance)tests/test_buckets.py— bucket route integration teststests/test_objects.py— object route integration teststests/test_presign.py— presigned URL testspyproject.toml— project config, minio-sdk dependency from Forgejo PyPICLAUDE.md— agent conventionsAcceptance Criteria
/docsserves Swagger UI with interactive try-it-out/openapi.jsonserves the OpenAPI specMINIO_ACCESS_KEY,MINIO_SECRET_KEY,MINIO_ENDPOINT)API Routes
Test Expectations
pytest tests/ -vConstraints
/— use{key:path}in FastAPI route paramsChecklist
Related
phase-minio-mobile-2a-fastapi-routes— phase noteproject-minio-mobile— project this advances