Convert web service from FastAPI to Django 6.1

Replace the FastAPI/SQLAlchemy/Alembic web service with a Django project
laid out like cumorah-build: manage.py at the root, settings in the
privatestudio.settings package (base/dev/production), and a
privatestudio.studio app.

- Studio model owns a unique bucket_name; access is granted through
  membership in the studio's auth Group. Assets, profiles and jobs are
  scoped to a studio; API keys and S3 credentials stay per user.
- JSON API via Django Ninja under /api/ (profiles and transcode jobs now
  live under /api/studios/{bucket}/).
- S3-compatible interface as plain class-based views under /s3/,
  supporting bearer tokens and AWS v4 signatures.
- create_studio and create_key management commands replace ps-serve.
- Fresh Django initial migration; tests ported to Django TestCase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shaun Kruger
2026-11-29 21:54:16 -07:00
co-authored by Claude Opus 5.5
parent 46adddd50a
commit b3b51f6cc5
60 changed files with 1776 additions and 3002 deletions
+10 -11
View File
@@ -6,14 +6,13 @@ build-backend = "setuptools.build_meta"
name = "privatestudio"
description = "Video transcoding tools with multi-profile H.264 encoding support"
readme = "notes.md"
requires-python = ">=3.8"
requires-python = ">=3.12"
dependencies = [
"PyYAML>=6.0",
"FastAPI>=0.100.0",
"uvicorn[standard]>=0.23.0",
"SQLAlchemy>=2.0.0",
"Alembic>=1.13.0",
"python-multipart>=0.0.5",
"Django~=6.1.0",
"django-ninja~=1.8",
"django-cors-headers~=4.9",
"dj-database-url~=3.1",
]
dynamic = ["version"]
@@ -21,20 +20,20 @@ dynamic = ["version"]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"httpx>=0.27.0",
"pytest-django>=4.14",
"boto3",
]
[project.scripts]
ps-transcode = "privatestudio.transcode:main"
ps-serve = "privatestudio.web.cli:main"
[tool.setuptools.packages.find]
include = ["privatestudio*"]
[tool.setuptools.package-data]
"privatestudio.migrations" = ["script.py.mako"]
[tool.setuptools_scm]
write_to = "privatestudio/_version.py"
fallback_version = "0.1.0-dev"
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "privatestudio.settings.dev"