From 6b16e1a586159a9bc9899fcc78161200bb46067f Mon Sep 17 00:00:00 2001 From: d-robotics Date: Tue, 1 Sep 2026 13:43:15 +0800 Subject: [PATCH] feat: add document metadata and source storage --- .env.example | 5 +- Makefile | 10 +- README.md | 9 +- alembic.ini | 38 ++++ docs/plans/PROGRESS.md | 13 +- migrations/README.md | 6 + migrations/env.py | 60 ++++++ migrations/script.py.mako | 27 +++ .../20260901_0001_create_documents.py | 75 ++++++++ packages/core/src/ekp_core/config.py | 4 + packages/core/src/ekp_core/database.py | 16 ++ packages/domain/src/ekp_domain/__init__.py | 5 + packages/domain/src/ekp_domain/document.py | 89 +++++++++ .../src/ekp_object_storage/__init__.py | 17 ++ .../src/ekp_object_storage/base.py | 36 ++++ .../src/ekp_object_storage/local.py | 64 +++++++ pyproject.toml | 19 +- tests/integration/test_document_migration.py | 32 ++++ tests/unit/test_config.py | 5 + tests/unit/test_document_model.py | 52 +++++ tests/unit/test_local_object_storage.py | 77 ++++++++ uv.lock | 180 ++++++++++++++++++ 22 files changed, 828 insertions(+), 11 deletions(-) create mode 100644 alembic.ini create mode 100644 migrations/README.md create mode 100644 migrations/env.py create mode 100644 migrations/script.py.mako create mode 100644 migrations/versions/20260901_0001_create_documents.py create mode 100644 packages/core/src/ekp_core/database.py create mode 100644 packages/domain/src/ekp_domain/__init__.py create mode 100644 packages/domain/src/ekp_domain/document.py create mode 100644 packages/providers/object_storage/src/ekp_object_storage/__init__.py create mode 100644 packages/providers/object_storage/src/ekp_object_storage/base.py create mode 100644 packages/providers/object_storage/src/ekp_object_storage/local.py create mode 100644 tests/integration/test_document_migration.py create mode 100644 tests/unit/test_document_model.py create mode 100644 tests/unit/test_local_object_storage.py diff --git a/.env.example b/.env.example index 11fa0ee..c0a46f7 100644 --- a/.env.example +++ b/.env.example @@ -9,7 +9,10 @@ DATABASE_URL=postgresql+psycopg://ekp:ekp@localhost:5432/ekp REDIS_URL=redis://localhost:6379/0 RABBITMQ_URL=amqp://guest:guest@localhost:5672// -OBJECT_STORAGE_PROVIDER=s3 +OBJECT_STORAGE_PROVIDER=local +OBJECT_STORAGE_PATH=storage + +# Reserved for a future S3/MinIO adapter; DEMO-002 uses local storage. OBJECT_STORAGE_ENDPOINT=http://localhost:9000 OBJECT_STORAGE_ACCESS_KEY= OBJECT_STORAGE_SECRET_KEY= diff --git a/Makefile b/Makefile index 8717eeb..a21d59e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -.PHONY: help install run format format-check lint typecheck test test-unit test-integration eval up down +.PHONY: help install run format format-check lint typecheck test test-unit test-integration migration-check eval up down -UV_CACHE_DIR ?= $(CURDIR)/tmp/uv-cache +UV_CACHE_DIR ?= /tmp/ekp-uv-cache export UV_CACHE_DIR help: @@ -14,6 +14,7 @@ help: @echo " test Run default tests" @echo " test-unit Run unit tests" @echo " test-integration Run integration tests" + @echo " migration-check Validate the forward migration path" @echo " eval Run RAG evaluation" @echo " up Start local dependencies" @echo " down Stop local dependencies" @@ -29,13 +30,16 @@ format-check: lint: uv run ruff check . typecheck: - uv run mypy apps/api/src packages/core/src tests + uv run mypy apps/api/src packages tests test: uv run pytest tests/unit tests/integration test-unit: uv run pytest tests/unit test-integration: uv run pytest tests/integration +migration-check: + uv run alembic heads + uv run alembic upgrade head --sql >/dev/null eval: uv run pytest tests/evaluation up: diff --git a/README.md b/README.md index 9d3ebf3..0aeb41b 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ The current implementation target is the retrieval demo defined in Prerequisites: - `uv` -- Docker (for PostgreSQL, MinIO, and later integration dependencies) +- Docker (for PostgreSQL and later integration dependencies) Install dependencies and run the API: @@ -62,5 +62,10 @@ versioned OpenAPI document is available at Run the development checks with: ```bash -make format-check lint typecheck test eval +make format-check lint typecheck test migration-check eval ``` + +Document metadata is canonical in PostgreSQL. Demo source files use the local +`storage/` directory through the provider-neutral `ObjectStorage` interface; +existing objects cannot be overwritten. Upload endpoints are introduced by +DEMO-003, not by the current storage foundation. diff --git a/alembic.ini b/alembic.ini new file mode 100644 index 0000000..4fd5253 --- /dev/null +++ b/alembic.ini @@ -0,0 +1,38 @@ +[alembic] +script_location = %(here)s/migrations +prepend_sys_path = . +path_separator = os + +[loggers] +keys = root,sqlalchemy,alembic + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = WARN +handlers = console +qualname = + +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine + +[logger_alembic] +level = INFO +handlers = +qualname = alembic + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(levelname)-5.5s [%(name)s] %(message)s +datefmt = %H:%M:%S diff --git a/docs/plans/PROGRESS.md b/docs/plans/PROGRESS.md index 7579b4c..2ead5f8 100644 --- a/docs/plans/PROGRESS.md +++ b/docs/plans/PROGRESS.md @@ -2,11 +2,11 @@ Current phase: Knowledge Retrieval Demo v0.1 -Completed: DEMO-001 +Completed: DEMO-001, DEMO-002 In progress: none Blocked: none -Next: DEMO-002 +Next: DEMO-003 The full V1 backlog is deferred until the Demo scope is complete. See `docs/demo/DEMO_SCOPE.md` for the active task sequence. @@ -20,3 +20,12 @@ The full V1 backlog is deferred until the Demo scope is complete. See - Added deterministic unit, integration, and seed evaluation tests. - Verified format, lint, strict type checking, tests, dependency lock, API startup, health response, and versioned OpenAPI output. + +### DEMO-002 + +- Added canonical Document metadata, simplified processing states, SQLAlchemy + database/session factories, and the first forward-only Alembic migration. +- Added the provider-neutral ObjectStorage contract and a local adapter that + prevents overwrite, rejects unsafe keys, and cleans interrupted writes. +- Added model, database, storage, migration, and schema-drift tests; PostgreSQL + SQL rendering is covered without requiring a running production database. diff --git a/migrations/README.md b/migrations/README.md new file mode 100644 index 0000000..6f04eb7 --- /dev/null +++ b/migrations/README.md @@ -0,0 +1,6 @@ +# Database migrations + +Migrations are forward-only and operate on PostgreSQL canonical metadata. Run +`make migration-check` to render the full upgrade path without changing a +database. Integration tests also apply the migration to a temporary database +and compare it with SQLAlchemy metadata. diff --git a/migrations/env.py b/migrations/env.py new file mode 100644 index 0000000..2deb343 --- /dev/null +++ b/migrations/env.py @@ -0,0 +1,60 @@ +"""Alembic environment for canonical document metadata migrations.""" + +from logging.config import fileConfig + +from alembic import context +from sqlalchemy import engine_from_config, pool + +from ekp_core.config import get_settings +from ekp_domain import Base + +config = context.config +if config.config_file_name is not None: + fileConfig(config.config_file_name) + +target_metadata = Base.metadata + + +def _database_url() -> str: + """Allow tests to override the URL without changing runtime settings.""" + override = config.attributes.get("database_url") + return override if isinstance(override, str) else get_settings().database_url + + +def run_migrations_offline() -> None: + """Render migration SQL without creating an engine or connection.""" + context.configure( + url=_database_url(), + target_metadata=target_metadata, + literal_binds=True, + dialect_opts={"paramstyle": "named"}, + compare_type=True, + ) + + with context.begin_transaction(): + context.run_migrations() + + +def run_migrations_online() -> None: + """Run migrations through a short-lived SQLAlchemy engine.""" + connectable = engine_from_config( + {"sqlalchemy.url": _database_url()}, + prefix="sqlalchemy.", + poolclass=pool.NullPool, + ) + + with connectable.connect() as connection: + context.configure( + connection=connection, + target_metadata=target_metadata, + compare_type=True, + ) + + with context.begin_transaction(): + context.run_migrations() + + +if context.is_offline_mode(): + run_migrations_offline() +else: + run_migrations_online() diff --git a/migrations/script.py.mako b/migrations/script.py.mako new file mode 100644 index 0000000..4dfeb5d --- /dev/null +++ b/migrations/script.py.mako @@ -0,0 +1,27 @@ +"""${message} + +Revision ID: ${up_revision} +Revises: ${down_revision | comma,n} +Create Date: ${create_date} +""" + +from collections.abc import Sequence + +from alembic import op +import sqlalchemy as sa +${imports if imports else ""} + +revision: str = ${repr(up_revision)} +down_revision: str | Sequence[str] | None = ${repr(down_revision)} +branch_labels: str | Sequence[str] | None = ${repr(branch_labels)} +depends_on: str | Sequence[str] | None = ${repr(depends_on)} + + +def upgrade() -> None: + """Apply the forward migration.""" + ${upgrades if upgrades else "pass"} + + +def downgrade() -> None: + """Reject downgrade because project migrations are forward-only.""" + raise NotImplementedError("Database migrations are forward-only") diff --git a/migrations/versions/20260901_0001_create_documents.py b/migrations/versions/20260901_0001_create_documents.py new file mode 100644 index 0000000..bdc4937 --- /dev/null +++ b/migrations/versions/20260901_0001_create_documents.py @@ -0,0 +1,75 @@ +"""Create canonical documents table. + +Revision ID: 20260901_0001 +Revises: None +Create Date: 2026-09-01 +""" + +from collections.abc import Sequence + +import sqlalchemy as sa +from alembic import op + +revision: str = "20260901_0001" +down_revision: str | None = None +branch_labels: str | Sequence[str] | None = None +depends_on: str | Sequence[str] | None = None + + +def upgrade() -> None: + """Create document metadata and processing-status index.""" + op.create_table( + "documents", + sa.Column("id", sa.Uuid(), nullable=False), + sa.Column("filename", sa.String(length=255), nullable=False), + sa.Column("media_type", sa.String(length=127), nullable=False), + sa.Column("size_bytes", sa.BigInteger(), nullable=False), + sa.Column("storage_key", sa.String(length=512), nullable=False), + sa.Column( + "status", + sa.Enum( + "uploaded", + "processing", + "ready", + "failed", + name="document_status", + native_enum=False, + create_constraint=False, + ), + nullable=False, + ), + sa.Column("error_message", sa.Text(), nullable=True), + sa.Column( + "created_at", + sa.DateTime(timezone=True), + server_default=sa.text("CURRENT_TIMESTAMP"), + nullable=False, + ), + sa.Column( + "updated_at", + sa.DateTime(timezone=True), + server_default=sa.text("CURRENT_TIMESTAMP"), + nullable=False, + ), + sa.CheckConstraint("length(filename) > 0", name="filename_not_empty"), + sa.CheckConstraint( + "length(storage_key) > 0", + name="storage_key_not_empty", + ), + sa.CheckConstraint( + "size_bytes >= 0", + name="size_bytes_non_negative", + ), + sa.CheckConstraint( + "status IN ('uploaded', 'processing', 'ready', 'failed')", + name="status_valid", + ), + sa.PrimaryKeyConstraint("id", name="pk_documents"), + sa.UniqueConstraint("storage_key", name="uq_documents_storage_key"), + ) + op.create_index("ix_documents_status", "documents", ["status"], unique=False) + + +def downgrade() -> None: + """Reject downgrade because project migrations are forward-only.""" + raise NotImplementedError("Database migrations are forward-only") diff --git a/packages/core/src/ekp_core/config.py b/packages/core/src/ekp_core/config.py index ec1fdbf..c060801 100644 --- a/packages/core/src/ekp_core/config.py +++ b/packages/core/src/ekp_core/config.py @@ -1,6 +1,7 @@ """Application configuration loaded from environment variables.""" from functools import lru_cache +from pathlib import Path from typing import Literal from pydantic import Field @@ -23,6 +24,9 @@ class Settings(BaseSettings): api_host: str = "0.0.0.0" api_port: int = Field(default=8000, ge=1, le=65535) api_prefix: str = "/api/v1" + database_url: str = "postgresql+psycopg://localhost:5432/ekp" + object_storage_provider: Literal["local"] = "local" + object_storage_path: Path = Path("storage") @lru_cache diff --git a/packages/core/src/ekp_core/database.py b/packages/core/src/ekp_core/database.py new file mode 100644 index 0000000..ad6054b --- /dev/null +++ b/packages/core/src/ekp_core/database.py @@ -0,0 +1,16 @@ +"""SQLAlchemy engine and session construction for canonical metadata.""" + +from sqlalchemy import Engine, create_engine +from sqlalchemy.orm import Session, sessionmaker + +from ekp_core.config import Settings + + +def create_database_engine(settings: Settings) -> Engine: + """Create the metadata engine without opening a connection eagerly.""" + return create_engine(settings.database_url, pool_pre_ping=True) + + +def create_session_factory(engine: Engine) -> sessionmaker[Session]: + """Create sessions that retain loaded attributes after a commit.""" + return sessionmaker(bind=engine, expire_on_commit=False) diff --git a/packages/domain/src/ekp_domain/__init__.py b/packages/domain/src/ekp_domain/__init__.py new file mode 100644 index 0000000..47fee91 --- /dev/null +++ b/packages/domain/src/ekp_domain/__init__.py @@ -0,0 +1,5 @@ +"""Canonical domain and persistence models for the retrieval demo.""" + +from ekp_domain.document import Base, Document, DocumentStatus + +__all__ = ["Base", "Document", "DocumentStatus"] diff --git a/packages/domain/src/ekp_domain/document.py b/packages/domain/src/ekp_domain/document.py new file mode 100644 index 0000000..ff13c9f --- /dev/null +++ b/packages/domain/src/ekp_domain/document.py @@ -0,0 +1,89 @@ +"""Canonical document metadata persisted independently from source bytes.""" + +from datetime import datetime +from enum import StrEnum +from uuid import UUID, uuid4 + +from sqlalchemy import ( + BigInteger, + CheckConstraint, + DateTime, + MetaData, + String, + Text, + Uuid, + func, +) +from sqlalchemy import ( + Enum as SqlEnum, +) +from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column + +NAMING_CONVENTION = { + "ix": "ix_%(column_0_label)s", + "uq": "uq_%(table_name)s_%(column_0_name)s", + "ck": "ck_%(table_name)s_%(constraint_name)s", + "fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s", + "pk": "pk_%(table_name)s", +} + + +class Base(DeclarativeBase): + """Declarative base with deterministic constraint names for migrations.""" + + metadata = MetaData(naming_convention=NAMING_CONVENTION) + + +class DocumentStatus(StrEnum): + """Simplified processing states required by the Demo UI.""" + + UPLOADED = "uploaded" + PROCESSING = "processing" + READY = "ready" + FAILED = "failed" + + +class Document(Base): + """Canonical metadata for one immutable source document.""" + + __tablename__ = "documents" + __table_args__ = ( + CheckConstraint("length(filename) > 0", name="filename_not_empty"), + CheckConstraint("length(storage_key) > 0", name="storage_key_not_empty"), + CheckConstraint("size_bytes >= 0", name="size_bytes_non_negative"), + CheckConstraint( + "status IN ('uploaded', 'processing', 'ready', 'failed')", + name="status_valid", + ), + ) + + id: Mapped[UUID] = mapped_column(Uuid(as_uuid=True), primary_key=True, default=uuid4) + filename: Mapped[str] = mapped_column(String(255), nullable=False) + media_type: Mapped[str] = mapped_column(String(127), nullable=False) + size_bytes: Mapped[int] = mapped_column(BigInteger, nullable=False) + storage_key: Mapped[str] = mapped_column(String(512), nullable=False, unique=True) + status: Mapped[DocumentStatus] = mapped_column( + SqlEnum( + DocumentStatus, + name="document_status", + native_enum=False, + create_constraint=False, + validate_strings=True, + values_callable=lambda enum_type: [item.value for item in enum_type], + ), + nullable=False, + default=DocumentStatus.UPLOADED, + index=True, + ) + error_message: Mapped[str | None] = mapped_column(Text, nullable=True) + created_at: Mapped[datetime] = mapped_column( + DateTime(timezone=True), + nullable=False, + server_default=func.now(), + ) + updated_at: Mapped[datetime] = mapped_column( + DateTime(timezone=True), + nullable=False, + server_default=func.now(), + onupdate=func.now(), + ) diff --git a/packages/providers/object_storage/src/ekp_object_storage/__init__.py b/packages/providers/object_storage/src/ekp_object_storage/__init__.py new file mode 100644 index 0000000..842800b --- /dev/null +++ b/packages/providers/object_storage/src/ekp_object_storage/__init__.py @@ -0,0 +1,17 @@ +"""Replaceable object storage contract and local Demo implementation.""" + +from ekp_object_storage.base import ( + InvalidStorageKeyError, + ObjectAlreadyExistsError, + ObjectStorage, + StoredObject, +) +from ekp_object_storage.local import LocalObjectStorage + +__all__ = [ + "InvalidStorageKeyError", + "LocalObjectStorage", + "ObjectAlreadyExistsError", + "ObjectStorage", + "StoredObject", +] diff --git a/packages/providers/object_storage/src/ekp_object_storage/base.py b/packages/providers/object_storage/src/ekp_object_storage/base.py new file mode 100644 index 0000000..afbdc2e --- /dev/null +++ b/packages/providers/object_storage/src/ekp_object_storage/base.py @@ -0,0 +1,36 @@ +"""Provider-neutral object storage types used by application services.""" + +from dataclasses import dataclass +from typing import BinaryIO, Protocol + + +class InvalidStorageKeyError(ValueError): + """Raised when a storage key is empty, absolute, or escapes the root.""" + + +class ObjectAlreadyExistsError(FileExistsError): + """Raised when immutable source bytes already exist at a storage key.""" + + +@dataclass(frozen=True, slots=True) +class StoredObject: + """Metadata returned after source bytes are stored successfully.""" + + key: str + size_bytes: int + + +class ObjectStorage(Protocol): + """Minimal source storage contract for the retrieval Demo.""" + + def put(self, key: str, source: BinaryIO) -> StoredObject: + """Store a new immutable object without replacing an existing key.""" + + def open(self, key: str) -> BinaryIO: + """Open an object for binary reading; the caller closes the stream.""" + + def delete(self, key: str) -> None: + """Delete one object using the Demo's direct-delete semantics.""" + + def exists(self, key: str) -> bool: + """Return whether an object exists at the key.""" diff --git a/packages/providers/object_storage/src/ekp_object_storage/local.py b/packages/providers/object_storage/src/ekp_object_storage/local.py new file mode 100644 index 0000000..72ccd6b --- /dev/null +++ b/packages/providers/object_storage/src/ekp_object_storage/local.py @@ -0,0 +1,64 @@ +"""Filesystem-backed object storage for the single-machine Demo.""" + +import shutil +from pathlib import Path +from typing import BinaryIO + +from ekp_object_storage.base import ( + InvalidStorageKeyError, + ObjectAlreadyExistsError, + StoredObject, +) + +COPY_BUFFER_BYTES = 1024 * 1024 + + +class LocalObjectStorage: + """Store source files below one root while preventing overwrite and traversal.""" + + def __init__(self, root: Path) -> None: + self._root = root.expanduser().resolve() + self._root.mkdir(parents=True, exist_ok=True) + + def put(self, key: str, source: BinaryIO) -> StoredObject: + """Stream a new object to disk and remove partial files on failure.""" + destination = self._resolve_key(key) + destination.parent.mkdir(parents=True, exist_ok=True) + + try: + target = destination.open("xb") + except FileExistsError as exc: + raise ObjectAlreadyExistsError(key) from exc + + try: + with target: + shutil.copyfileobj(source, target, length=COPY_BUFFER_BYTES) + except BaseException: + # A partial source must never be exposed as a successfully stored object. + destination.unlink(missing_ok=True) + raise + + return StoredObject(key=key, size_bytes=destination.stat().st_size) + + def open(self, key: str) -> BinaryIO: + """Open stored bytes in read-only binary mode.""" + return self._resolve_key(key).open("rb") + + def delete(self, key: str) -> None: + """Remove source bytes directly, as permitted by the Demo scope.""" + self._resolve_key(key).unlink() + + def exists(self, key: str) -> bool: + """Return true only for stored files, not directories.""" + return self._resolve_key(key).is_file() + + def _resolve_key(self, key: str) -> Path: + """Resolve a portable POSIX key without allowing root escape.""" + parts = key.split("/") + if not key or "\\" in key or any(part in {"", ".", ".."} for part in parts): + raise InvalidStorageKeyError(key) + + candidate = self._root.joinpath(*parts).resolve() + if candidate == self._root or not candidate.is_relative_to(self._root): + raise InvalidStorageKeyError(key) + return candidate diff --git a/pyproject.toml b/pyproject.toml index 4c644f9..2bfd46c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,8 +9,11 @@ description = "Enterprise Knowledge Platform retrieval demo" readme = "README.md" requires-python = ">=3.12,<3.14" dependencies = [ + "alembic>=1.18,<2", "fastapi>=0.115,<1", + "psycopg[binary]>=3.2,<4", "pydantic-settings>=2.7,<3", + "sqlalchemy>=2.0,<3", "uvicorn[standard]>=0.34,<1", ] @@ -24,7 +27,12 @@ dev = [ ] [tool.setuptools.packages.find] -where = ["apps/api/src", "packages/core/src"] +where = [ + "apps/api/src", + "packages/core/src", + "packages/domain/src", + "packages/providers/object_storage/src", +] [tool.ruff] target-version = "py312" @@ -34,12 +42,17 @@ line-length = 100 select = ["ASYNC", "B", "E4", "E7", "E9", "F", "I", "UP"] [tool.ruff.lint.isort] -known-first-party = ["ekp_api", "ekp_core"] +known-first-party = ["ekp_api", "ekp_core", "ekp_domain", "ekp_object_storage"] [tool.mypy] python_version = "3.12" strict = true -mypy_path = ["apps/api/src", "packages/core/src"] +mypy_path = [ + "apps/api/src", + "packages/core/src", + "packages/domain/src", + "packages/providers/object_storage/src", +] [tool.pytest.ini_options] addopts = "--strict-config --strict-markers -ra" diff --git a/tests/integration/test_document_migration.py b/tests/integration/test_document_migration.py new file mode 100644 index 0000000..c3e3072 --- /dev/null +++ b/tests/integration/test_document_migration.py @@ -0,0 +1,32 @@ +"""Migration tests for canonical Document metadata.""" + +from pathlib import Path + +from alembic import command +from alembic.config import Config +from sqlalchemy import create_engine, inspect + + +def test_document_migration_matches_metadata(tmp_path: Path) -> None: + project_root = Path(__file__).resolve().parents[2] + database_path = tmp_path / "migration.sqlite3" + database_url = f"sqlite+pysqlite:///{database_path}" + config = Config(project_root / "alembic.ini") + config.attributes["database_url"] = database_url + + command.upgrade(config, "head") + command.check(config) + + inspector = inspect(create_engine(database_url)) + assert "documents" in inspector.get_table_names() + assert {column["name"] for column in inspector.get_columns("documents")} == { + "id", + "filename", + "media_type", + "size_bytes", + "storage_key", + "status", + "error_message", + "created_at", + "updated_at", + } diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py index e6f676c..73a33f7 100644 --- a/tests/unit/test_config.py +++ b/tests/unit/test_config.py @@ -1,5 +1,7 @@ """Tests for typed application settings.""" +from pathlib import Path + import pytest from pydantic import ValidationError @@ -12,6 +14,9 @@ def test_settings_have_demo_defaults(isolated_settings_environment: None) -> Non assert settings.app_env == "development" assert settings.api_prefix == "/api/v1" assert settings.api_port == 8000 + assert settings.database_url.startswith("postgresql+psycopg://") + assert settings.object_storage_provider == "local" + assert settings.object_storage_path == Path("storage") def test_settings_reject_invalid_port(isolated_settings_environment: None) -> None: diff --git a/tests/unit/test_document_model.py b/tests/unit/test_document_model.py new file mode 100644 index 0000000..17e1485 --- /dev/null +++ b/tests/unit/test_document_model.py @@ -0,0 +1,52 @@ +"""Tests for canonical Document metadata.""" + +from sqlalchemy import create_engine, select +from sqlalchemy.orm import Session + +from ekp_core.config import Settings +from ekp_core.database import create_database_engine, create_session_factory +from ekp_domain import Base, Document, DocumentStatus + + +def test_document_defaults_and_round_trips() -> None: + engine = create_engine("sqlite+pysqlite:///:memory:") + Base.metadata.create_all(engine) + + document = Document( + filename="产品说明.md", + media_type="text/markdown", + size_bytes=128, + storage_key="documents/source.md", + ) + + with Session(engine) as session: + session.add(document) + session.commit() + stored = session.scalar(select(Document).where(Document.id == document.id)) + + assert stored is not None + assert stored.status is DocumentStatus.UPLOADED + assert stored.filename == "产品说明.md" + assert stored.created_at is not None + assert stored.updated_at is not None + + +def test_database_factory_creates_usable_sessions(isolated_settings_environment: None) -> None: + settings = Settings(database_url="sqlite+pysqlite:///:memory:") + engine = create_database_engine(settings) + Base.metadata.create_all(engine) + session_factory = create_session_factory(engine) + + with session_factory() as session: + session.add( + Document( + filename="制度.txt", + media_type="text/plain", + size_bytes=16, + storage_key="documents/policy.txt", + ) + ) + session.commit() + count = len(session.scalars(select(Document)).all()) + + assert count == 1 diff --git a/tests/unit/test_local_object_storage.py b/tests/unit/test_local_object_storage.py new file mode 100644 index 0000000..3f31b86 --- /dev/null +++ b/tests/unit/test_local_object_storage.py @@ -0,0 +1,77 @@ +"""Tests for immutable filesystem-backed source storage.""" + +from io import BytesIO +from pathlib import Path + +import pytest + +from ekp_object_storage import ( + InvalidStorageKeyError, + LocalObjectStorage, + ObjectAlreadyExistsError, +) + + +class FailingSource(BytesIO): + """Binary stream that simulates an interrupted upload.""" + + def read(self, size: int | None = -1) -> bytes: + raise OSError("simulated source failure") + + +def test_put_open_exists_and_delete(tmp_path: Path) -> None: + storage = LocalObjectStorage(tmp_path / "objects") + + stored = storage.put("documents/source.txt", BytesIO(b"source bytes")) + + assert stored.key == "documents/source.txt" + assert stored.size_bytes == 12 + assert storage.exists(stored.key) + with storage.open(stored.key) as source: + assert source.read() == b"source bytes" + + storage.delete(stored.key) + assert not storage.exists(stored.key) + + +def test_put_never_overwrites_immutable_source(tmp_path: Path) -> None: + storage = LocalObjectStorage(tmp_path) + storage.put("document.txt", BytesIO(b"original")) + + with pytest.raises(ObjectAlreadyExistsError): + storage.put("document.txt", BytesIO(b"replacement")) + + with storage.open("document.txt") as source: + assert source.read() == b"original" + + +def test_put_removes_partial_file_after_stream_failure(tmp_path: Path) -> None: + storage = LocalObjectStorage(tmp_path) + + with pytest.raises(OSError, match="simulated source failure"): + storage.put("interrupted.bin", FailingSource()) + + assert not storage.exists("interrupted.bin") + + +@pytest.mark.parametrize( + "key", + ["", "/absolute.txt", "../escape.txt", "nested/../escape.txt", "bad\\key.txt"], +) +def test_storage_rejects_unsafe_keys(tmp_path: Path, key: str) -> None: + storage = LocalObjectStorage(tmp_path) + + with pytest.raises(InvalidStorageKeyError): + storage.put(key, BytesIO(b"unsafe")) + + +def test_storage_rejects_symlink_escape(tmp_path: Path) -> None: + root = tmp_path / "root" + outside = tmp_path / "outside" + root.mkdir() + outside.mkdir() + (root / "linked").symlink_to(outside, target_is_directory=True) + storage = LocalObjectStorage(root) + + with pytest.raises(InvalidStorageKeyError): + storage.put("linked/escape.txt", BytesIO(b"unsafe")) diff --git a/uv.lock b/uv.lock index 2f9caa9..37de5c7 100644 --- a/uv.lock +++ b/uv.lock @@ -2,6 +2,20 @@ version = 1 revision = 3 requires-python = ">=3.12, <3.14" +[[package]] +name = "alembic" +version = "1.19.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mako" }, + { name = "sqlalchemy" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/16/2b/e4153978368de59918115c9e01d3ebf58a558a7285efa7e960c383c4b59a/alembic-1.19.1.tar.gz", hash = "sha256:e0fca0518118c78acc493e31bcb5402f190057aaf6df8b5b95ce94c4789cf648", size = 2070816, upload-time = "2026-08-08T16:32:01.565Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/20/89/e62cc37b69ad357cc8ecd6e7367f5245f523d3cbb338a66197212bdf6749/alembic-1.19.1-py3-none-any.whl", hash = "sha256:b39018cb3d9413a19cbd54cf3c02ad33998641f0538eb77413a488a21c3e14be", size = 265946, upload-time = "2026-08-08T16:32:03.153Z" }, +] + [[package]] name = "annotated-doc" version = "0.0.5" @@ -95,8 +109,11 @@ name = "enterprise-knowledge-platform" version = "0.1.0" source = { editable = "." } dependencies = [ + { name = "alembic" }, { name = "fastapi" }, + { name = "psycopg", extra = ["binary"] }, { name = "pydantic-settings" }, + { name = "sqlalchemy" }, { name = "uvicorn", extra = ["standard"] }, ] @@ -111,8 +128,11 @@ dev = [ [package.metadata] requires-dist = [ + { name = "alembic", specifier = ">=1.18,<2" }, { name = "fastapi", specifier = ">=0.115,<1" }, + { name = "psycopg", extras = ["binary"], specifier = ">=3.2,<4" }, { name = "pydantic-settings", specifier = ">=2.7,<3" }, + { name = "sqlalchemy", specifier = ">=2.0,<3" }, { name = "uvicorn", extras = ["standard"], specifier = ">=0.34,<1" }, ] @@ -141,6 +161,30 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/03/10388a42375ee7e4ac9b94eb2c5c569c8b5795e377e701c9ac3ad63de890/fastapi-0.141.1-py3-none-any.whl", hash = "sha256:bfb91aa2d334c61cb35ba9a116fc123b3d3df31640b801cf57a7a78ec3f603b3", size = 131954, upload-time = "2026-07-29T17:18:04.364Z" }, ] +[[package]] +name = "greenlet" +version = "3.5.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0b/d8/7cc97c142388aef03f622e001c572c4f84e9252a439549d483f555771970/greenlet-3.5.5.tar.gz", hash = "sha256:adb4bae02e91a8e863e48b177e4014bdcac8a6b5e047ea1df687a61534b85e6c", size = 207585, upload-time = "2026-08-10T15:09:36.136Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2e/7e/9ecd0285e3153532ae07aeb88063c43c72b4221cf0d4d123b02f3682e3ff/greenlet-3.5.5-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:49520f0c95a48b42cf55414b8e8479beb274ea70431afc33e3f79903c71f4380", size = 295809, upload-time = "2026-08-10T13:25:34.023Z" }, + { url = "https://files.pythonhosted.org/packages/35/73/60e4bbcc89252037b18087f2ec16405d5b2d5be42dde191bbf3667e96102/greenlet-3.5.5-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:55272212cbc5f43d1d723725ab931f1939969b7e9523882ca58b55061769d053", size = 611910, upload-time = "2026-08-10T14:14:35.18Z" }, + { url = "https://files.pythonhosted.org/packages/a4/17/cd5134be659cd4a443e7a61ae670dabec165a814c51162916d637b6dd38e/greenlet-3.5.5-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:655bca754a2ef4efcb0eb48a94d3f4593536d0f3d48f8ed44343c01d16a92f95", size = 624198, upload-time = "2026-08-10T14:27:25.229Z" }, + { url = "https://files.pythonhosted.org/packages/78/ac/5c5b959999b6f09c3026b5dfe171575bc3121c5236ce74f495096f25b203/greenlet-3.5.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:147b25a42e5ca5be3d42356e8f608b37af715a1c196e9bf9d1627f3341adfe1d", size = 621439, upload-time = "2026-08-10T13:40:49.391Z" }, + { url = "https://files.pythonhosted.org/packages/c8/8b/6acf112ed8aee499f25b4d6949820fb02ac950ff9c1f3d793bd5be0599f2/greenlet-3.5.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:27493374cff1d1b7919dc8126547f2aea582737e3046147b434b1e12de56389b", size = 1581342, upload-time = "2026-08-10T14:15:05.653Z" }, + { url = "https://files.pythonhosted.org/packages/b8/d7/734e5f198888876b42d7616ff6644c075baf6b8a2412deadd6b0e1b8b20c/greenlet-3.5.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:12e2ee66c2aba86133f10fd99d6a8856c6d351ffb7be0e4d52ef2cc5fbb705b2", size = 1645744, upload-time = "2026-08-10T13:40:30.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/30/1f42b88dc587b5899ee50616ad56ee40cafaf225df4fb829f10183c62a5c/greenlet-3.5.5-cp312-cp312-win_amd64.whl", hash = "sha256:49ddacd36af37735fab103846f4ee4d18a492dde72730d1699c0c8ebe30d9f18", size = 324171, upload-time = "2026-08-10T13:28:44.472Z" }, + { url = "https://files.pythonhosted.org/packages/76/e5/4dee4d8d2e603fe5fdd7b444e63219f7b9bd852c60c6214511c7157cbe88/greenlet-3.5.5-cp312-cp312-win_arm64.whl", hash = "sha256:5f1b1ff4828cdc1aba4266aff814085d04a1d07959287219af021b838b265d52", size = 308362, upload-time = "2026-08-10T13:26:46.839Z" }, + { url = "https://files.pythonhosted.org/packages/fb/3d/8cef5f724ec0d4add2af8961d504535ec60c3cca9e464f6d03bdba29d85b/greenlet-3.5.5-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:b79fd2a5bc099b5e744f34c4c9a58954a5f4cb7529fb4b6e8446057d61b6edaa", size = 294730, upload-time = "2026-08-10T13:27:51.206Z" }, + { url = "https://files.pythonhosted.org/packages/88/4b/8e7aa3f514273aecff30a16ab1bac09ff54cfc7e6860fdd8058c37ff2499/greenlet-3.5.5-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:634cf15a233a949136879dd388e25d3296e16f3f1e217d2456797b8579ebc6ed", size = 614536, upload-time = "2026-08-10T14:14:36.589Z" }, + { url = "https://files.pythonhosted.org/packages/85/48/4e95e9dd5a8a397dc6a6345dd7f1935113d0fca4f85e89d3976da9cd988d/greenlet-3.5.5-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:499adea519f748407fc6806d20eedabac2884fd73b9f38d81236e190ba20dfef", size = 626924, upload-time = "2026-08-10T14:27:27.048Z" }, + { url = "https://files.pythonhosted.org/packages/89/5d/398a1c71fa7a277deeb376c999979de6786f08fc2d5747a0b9d6e11738dd/greenlet-3.5.5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2eabb980975cba5b93a95f6f69287d05fc05ac955bfd6a320a7c083eeb52c0b0", size = 623906, upload-time = "2026-08-10T13:40:50.501Z" }, + { url = "https://files.pythonhosted.org/packages/04/1b/745450fc5ea9e0cb17d840d248f284db3363de736d362c7d2d883e3eadba/greenlet-3.5.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:03115c2e0a371999bf8ae616aa8d653f96641d4705c457aebaa187276e9f7537", size = 1581430, upload-time = "2026-08-10T14:15:06.853Z" }, + { url = "https://files.pythonhosted.org/packages/d4/29/d51b296e3191bb15d3d81ec375af1909e4466c0f395d744ed475801798a9/greenlet-3.5.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4441153ffba21b90d3ca89fe3d31f5c093ae6c0bf0cfdfc98f54cde22f95b62e", size = 1645684, upload-time = "2026-08-10T13:40:32.133Z" }, + { url = "https://files.pythonhosted.org/packages/12/63/369f1a1625e64e9e31df3963c6044056e3fdfa3fa3fdba3c54ffefa6e987/greenlet-3.5.5-cp313-cp313-win_amd64.whl", hash = "sha256:95c5b1f4b3a193f8a0c2de4bfdcb48d119f7f1063941f1de1f2168051b3e52dd", size = 324075, upload-time = "2026-08-10T13:26:58.974Z" }, + { url = "https://files.pythonhosted.org/packages/45/78/649cb5c09d4d81f6dd1444e75474a7206784743283a21d24171562ac4899/greenlet-3.5.5-cp313-cp313-win_arm64.whl", hash = "sha256:1af90aa4bc129883b340cdd6957a3bc74f60528a4993bbd1f53aaebe1d9981cc", size = 308260, upload-time = "2026-08-10T13:27:50.795Z" }, +] + [[package]] name = "h11" version = "0.16.0" @@ -268,6 +312,59 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/27/83/335bccf6c7cb9028cb0b54aead27d9ece3f01f83bc6baa2abace5da655c1/librt-0.15.0-cp313-cp313-win_arm64.whl", hash = "sha256:0a15cb554761247d84a3ec0cbdf4078d70725384f0e4662c0fa3b26266eb60ad", size = 112188, upload-time = "2026-08-07T10:47:38.729Z" }, ] +[[package]] +name = "mako" +version = "1.4.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2a/12/b5fa2353e2754cd67fb9f83793fa48ff42c213a5da7e719869d2301f6ab8/mako-1.4.1.tar.gz", hash = "sha256:d7904710b662996425a21627710c4777c45053146942cf8a7aebf757c92b8c27", size = 410165, upload-time = "2026-08-05T06:10:56.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a5/54/12ed58d458474aaab5c3d180173e745a4fe131bb330370596876d19ff60f/mako-1.4.1-py3-none-any.whl", hash = "sha256:a359d9a94a541213958742b2698d0a7757bb83551767bc468a74b9905aba9617", size = 80010, upload-time = "2026-08-05T06:10:58.248Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, + { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, + { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, + { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" }, + { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" }, + { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" }, + { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" }, + { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" }, + { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" }, + { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" }, + { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" }, + { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" }, + { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" }, + { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" }, + { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" }, + { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" }, + { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" }, + { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" }, + { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" }, + { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" }, + { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" }, + { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" }, + { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" }, + { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" }, + { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" }, + { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" }, + { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" }, + { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" }, + { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" }, + { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" }, + { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" }, + { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, +] + [[package]] name = "mypy" version = "1.20.2" @@ -333,6 +430,53 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, ] +[[package]] +name = "psycopg" +version = "3.3.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, + { name = "tzdata", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/72/73/8fb739d0f6bba247b9b93c9840c402a4f88545be5f1d4b02b23366371c00/psycopg-3.3.5.tar.gz", hash = "sha256:d0a3d9ccf5788af054cbd745278cb02401b5c312aeaafbf2c6144460aec47da4", size = 166508, upload-time = "2026-08-31T22:45:43.151Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3d/2e/d0a645bcaadde68bd6d93c43f02f14b0191bdda367ce3f7722abe3da744a/psycopg-3.3.5-py3-none-any.whl", hash = "sha256:ce5aa5cdb4f9379f00f487590e5890bfa7df9a164648c969ffa628505e21af4e", size = 213598, upload-time = "2026-08-31T22:39:02.184Z" }, +] + +[package.optional-dependencies] +binary = [ + { name = "psycopg-binary", marker = "implementation_name != 'pypy'" }, +] + +[[package]] +name = "psycopg-binary" +version = "3.3.5" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5e/83/ba396428a4fb6b70f0dd41315ad86a2c14441b7214afd47b2d49cb450b78/psycopg_binary-3.3.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:25105f9b46bdf2a30fcb67f56976ed66f6855941ae16bc024192609b917d493c", size = 4700169, upload-time = "2026-08-31T22:41:39.712Z" }, + { url = "https://files.pythonhosted.org/packages/4f/56/b23c5978e55cf4effdc5a3e13a17d69a580a487993e01b7c3768dd24281c/psycopg_binary-3.3.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0249c3e960cdee686000eb77169fb6590105c05bacc37e057ccdffdcd8e6ebde", size = 4763037, upload-time = "2026-08-31T22:41:47.571Z" }, + { url = "https://files.pythonhosted.org/packages/fd/d8/b41108bfe194b4098076c8b873b05ec2ca9582445eccfd9075970d7b948e/psycopg_binary-3.3.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5698ab5941a4d138c30fef858588e651fe7d583280cd6e41832825ad9e747750", size = 5546232, upload-time = "2026-08-31T22:41:55.817Z" }, + { url = "https://files.pythonhosted.org/packages/21/d1/0f244dfef389e52e9dc3056f2a9033d1f6901e97d24d9a9c8b836e32ab6b/psycopg_binary-3.3.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:682a17a57415c3ca1731eec018ed031f012ffcb81ba74806eb219cb396065672", size = 5227752, upload-time = "2026-08-31T22:42:03.776Z" }, + { url = "https://files.pythonhosted.org/packages/31/88/a4781365f09807fb91435e2d00096f3f6ae5d06bce15ef3c3c385dc22772/psycopg_binary-3.3.5-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d2a61e8147902771df7efe14062a3c8736347850d0d8befcf048235752504f2e", size = 6824658, upload-time = "2026-08-31T22:42:13.263Z" }, + { url = "https://files.pythonhosted.org/packages/65/f1/072c4a46287644694731b3e40fab120ebacf6d153cce7ebf7a5b208f5561/psycopg_binary-3.3.5-cp312-cp312-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f7e1e45aad410e20de45df2b159df68ff6c8dbf47a3501f806c4489b27f4ad2b", size = 5061439, upload-time = "2026-08-31T22:42:18.591Z" }, + { url = "https://files.pythonhosted.org/packages/e2/d6/1776a95c16941b8bbce89407cc7cf9ea3fd557efb503a40873c9e2b6394f/psycopg_binary-3.3.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c09775c549b40b274206e1b043c5e5b5af39666e85c98382a30bd05d23ab677b", size = 4588586, upload-time = "2026-08-31T22:42:25.23Z" }, + { url = "https://files.pythonhosted.org/packages/82/64/44ec87b9a74faebe966856307b65c0d35ee6321ce509cdd0e8d6a3f5338b/psycopg_binary-3.3.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:cf0e5e63ee86098299c673992053d556c489ba9ae6aca6cb6e24d16a8e0b09e6", size = 4265161, upload-time = "2026-08-31T22:42:31.864Z" }, + { url = "https://files.pythonhosted.org/packages/24/88/cf181df5651395a80afc520f5fefac72beb035c0c9d58ab7fcc880c9b221/psycopg_binary-3.3.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:c065531e8c1815276f50dbfa283e3a7f022671414cdda6fa9a16794dd53b28f9", size = 3998727, upload-time = "2026-08-31T22:42:38.436Z" }, + { url = "https://files.pythonhosted.org/packages/43/1e/c72a1107647db4bb3f534c7fe1b57b1957d9c099e795f5aa81f4a2e0c312/psycopg_binary-3.3.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:df9853b832b7b916e02ef68e0d5403a7dab2d5c1ddfe94f22b1b155eb862622f", size = 4310119, upload-time = "2026-08-31T22:42:46.403Z" }, + { url = "https://files.pythonhosted.org/packages/03/8d/452620608cafff164737e20b42ebffee8151b865ee171ba0d6692a560a44/psycopg_binary-3.3.5-cp312-cp312-win_amd64.whl", hash = "sha256:35885e333020fc152d27bea1a494bef13b2e68f6fd92b6229015e93539152008", size = 3648197, upload-time = "2026-08-31T22:42:51.575Z" }, + { url = "https://files.pythonhosted.org/packages/e0/1c/e718752cc63cf4e99e4a10fd36e3a3364dabdd0819484a24c0d79fbb9685/psycopg_binary-3.3.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6e85d50b87257fb117675a19ee59daa7bf9a57f6431500adf7059df799232ef4", size = 4704421, upload-time = "2026-08-31T22:42:59.564Z" }, + { url = "https://files.pythonhosted.org/packages/af/cf/a0e748e27c09b92738e4460582d121ba1908be3e36791e150f435e54b332/psycopg_binary-3.3.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e5becd311f9af8d180bad372f51fb2252fd02cb2073056e2b170c9274f95fe7f", size = 4765054, upload-time = "2026-08-31T22:43:05.421Z" }, + { url = "https://files.pythonhosted.org/packages/39/62/0cbac0266d56c94dd1f702d9af2b5d54bf80b6e658048f4f2c5bd63dd7e3/psycopg_binary-3.3.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:19e5bf9872dbd164c220567fd385ba2309c7d9df1541f78343510c6b0f36a1b7", size = 5547137, upload-time = "2026-08-31T22:43:11.768Z" }, + { url = "https://files.pythonhosted.org/packages/fb/3a/73c6f8871f38fc07a9c0b4cbc9467beb116a2783cecf87dfa53900a396dc/psycopg_binary-3.3.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:cb3b3bffebfe07110730626e76238161124f35ac87b748d663316a28d22f58b0", size = 5227577, upload-time = "2026-08-31T22:43:20.767Z" }, + { url = "https://files.pythonhosted.org/packages/59/7b/9f17b9f4d297b774dc574199c4dcd02dadc32a00c4056265918de5c70635/psycopg_binary-3.3.5-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2111f880add40fb03c60556069ad68e884a0908a74d2debafc603caf93b73552", size = 6824606, upload-time = "2026-08-31T22:43:33.698Z" }, + { url = "https://files.pythonhosted.org/packages/94/86/d84dadd94a004dbbb43ce0579f1f766fdc6b8cbef745090e24bea77b5283/psycopg_binary-3.3.5-cp313-cp313-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:40505676b1526b9ea387dace034040a8c8b0bcf984cd6bd4720a2ab15e813586", size = 5060854, upload-time = "2026-08-31T22:43:42.258Z" }, + { url = "https://files.pythonhosted.org/packages/30/d0/e5078be2c7d2490c0d6cd4cb7b3601aec44be2fa8b3fe927e9419b06004f/psycopg_binary-3.3.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5816472e3bb05615f33a741e0835043d1f4bf9709ff30d2f4aed71815cfc6b5e", size = 4589511, upload-time = "2026-08-31T22:43:50.012Z" }, + { url = "https://files.pythonhosted.org/packages/f1/01/08dfb5b18fa482e025864fd91a022310d0782c42e4cf5dda5d0e010b6790/psycopg_binary-3.3.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:358748fc4c8ccdc0e2bdf55420494930e19c3ade586ea9c3a6de3dad1f897311", size = 4268144, upload-time = "2026-08-31T22:43:56.993Z" }, + { url = "https://files.pythonhosted.org/packages/88/b9/cb01dc1d63f3241b49b2ca7fb9f98d0f5c76127f0dbb9440635a6ad0233e/psycopg_binary-3.3.5-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:1ef2e498be47800f6202b9a2304c22646325ca6d54001b7c785bcfdb24a1e8ab", size = 4001036, upload-time = "2026-08-31T22:44:04.429Z" }, + { url = "https://files.pythonhosted.org/packages/95/49/7c17dd832c05b380562ff2ff5f6ab2bcaeca8b7fff2c2b355854368a5bdb/psycopg_binary-3.3.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:88e01aa2e938a45655a8a5213fc3a44ba78cb4cab8a569b3e0bcb3d1d0eaba16", size = 4313112, upload-time = "2026-08-31T22:44:12.446Z" }, + { url = "https://files.pythonhosted.org/packages/7c/2c/b0b2f887185d6a2ec0b3bef948cc07656d2d1a5d96fa7f2bb03f6ef06ca4/psycopg_binary-3.3.5-cp313-cp313-win_amd64.whl", hash = "sha256:ba466011569297114449df9d523438e1adeedf3e4f31ffb78e897ec3fef3076b", size = 3647313, upload-time = "2026-08-31T22:44:19.139Z" }, +] + [[package]] name = "pydantic" version = "2.13.5" @@ -508,6 +652,33 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/73/e3/7df5a396e445b9ba49ce9a9437439a4d80042c61c0ade199abf8d16de1ac/ruff-0.16.5-py3-none-win_arm64.whl", hash = "sha256:a64abe90968719b851bb7cedffaa8753fbdbdadab483089682db623f3edc587e", size = 10391564, upload-time = "2026-08-27T16:34:16.064Z" }, ] +[[package]] +name = "sqlalchemy" +version = "2.0.52" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "greenlet", marker = "platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3b/21/77b4c147963073040dc3c3a5cb7a8c3001a1893c0209432cb77f9df836aa/sqlalchemy-2.0.52.tar.gz", hash = "sha256:5e2d46356ac2ccb7d268ab6c2319ac6a2b42f1b8d5fd8bd3d46855cd82abee97", size = 9945637, upload-time = "2026-08-11T19:07:09.829Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/d5/1b77a026d161f98a08f11af1a5f6c47b98ee7c7e2648af525a1004826c78/sqlalchemy-2.0.52-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:be8c49131665dfe2cc74c498aa1240ffb548d0fd901325dd11c2c7a18956f727", size = 2170940, upload-time = "2026-08-11T20:58:11.25Z" }, + { url = "https://files.pythonhosted.org/packages/54/bd/f444444adb37b5d53753fb1730ee7a421628e2e3b756c4da461af7e6394a/sqlalchemy-2.0.52-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b2d9e507a458832adcfbd8af6e2036ddf069b7710b799448542ebccae2dceee", size = 3383415, upload-time = "2026-08-11T21:02:38.534Z" }, + { url = "https://files.pythonhosted.org/packages/be/57/2eadf93a552568c57e8680b7e58bb5e9770d80942a1bdbaf4f2f63f0d7c8/sqlalchemy-2.0.52-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8738008376d22f30f411ea3efecf39b51110b6996d80bb73786f30bcfdd5fd3b", size = 3398577, upload-time = "2026-08-11T21:16:59.092Z" }, + { url = "https://files.pythonhosted.org/packages/15/c3/2887cf9dd111d1fbf05d22165b404c221ef43e029f7a2695e7302f27a7cc/sqlalchemy-2.0.52-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:37a4d548327b6cab9c7d8cdb4e0e82feabee0110c4d150059068e2d1cfbd99ee", size = 3328225, upload-time = "2026-08-11T21:02:40.183Z" }, + { url = "https://files.pythonhosted.org/packages/02/0f/466bdf9e1feeeef5587f868c187d8687e21ff8c85b1775e9041130181132/sqlalchemy-2.0.52-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e49f51a5d59857a7a0dcaf9469febf7197d9394bd88f00d69c2c4e848112cdbf", size = 3357374, upload-time = "2026-08-11T21:17:01.076Z" }, + { url = "https://files.pythonhosted.org/packages/22/20/5c2b4583904af4173076dda1c9e53c9e2ffc7a702d2efde0216bbacbf7cb/sqlalchemy-2.0.52-cp312-cp312-win32.whl", hash = "sha256:afda3ec521d0517d0de783fc70030775841900896d832de5bbd066549290470e", size = 2129366, upload-time = "2026-08-11T21:14:50.991Z" }, + { url = "https://files.pythonhosted.org/packages/ed/06/543dab8ef62d4e9fb96fb31a30c2b8b14a8763bccf48d428294d6b3041c0/sqlalchemy-2.0.52-cp312-cp312-win_amd64.whl", hash = "sha256:2d5e53e36e37129fe0be8b9d08b6e4052c10a963ee6cda56c8c10dcc194b99ca", size = 2157344, upload-time = "2026-08-11T21:14:52.453Z" }, + { url = "https://files.pythonhosted.org/packages/7f/18/e30c6fe1eca1bf34a39fbdd6066121cc9974c850faf6f349eac563697a26/sqlalchemy-2.0.52-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2eb3c6a64b1bfe6704777cfd504e7b8ad093a5f3e03ce67663a5e6742f294e43", size = 2167724, upload-time = "2026-08-11T20:58:12.679Z" }, + { url = "https://files.pythonhosted.org/packages/d0/56/2e17d161a4f7ecc1c2ffb93e607b4e1898bb551b451b283235acb8f6ce47/sqlalchemy-2.0.52-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:923bb183c1dc64fdf7b717965e3d59938ec4f8b8710b419a21ce403e5da9a9e1", size = 3321189, upload-time = "2026-08-11T21:02:41.932Z" }, + { url = "https://files.pythonhosted.org/packages/cf/b8/8490916e893f3f8d74dc9cc54c078619364999dee37047a188e73abbc852/sqlalchemy-2.0.52-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:651d6d8782e80679e6151707c7b490834d46ada526328895abf567f25e63d29c", size = 3338185, upload-time = "2026-08-11T21:17:02.597Z" }, + { url = "https://files.pythonhosted.org/packages/8b/f7/752cc8ee453da222829b3f5c4613614bf750d97429363b70414fa10478e4/sqlalchemy-2.0.52-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b08cddb8989775e3c88799d86704bdfc3ee6e9846118201aa5997f16f27e3a15", size = 3271698, upload-time = "2026-08-11T21:02:43.963Z" }, + { url = "https://files.pythonhosted.org/packages/51/e6/074ade0c07b9e4c8e8bca46820320ed94df9702afdb6f2af06623068d2e6/sqlalchemy-2.0.52-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ab66fa9618269390d4dfa222f2f2f88f7bc4bf5da13905131b818217db7e8057", size = 3308936, upload-time = "2026-08-11T21:17:04.172Z" }, + { url = "https://files.pythonhosted.org/packages/66/07/557c0d04716705599227945ac14e0a17ad0338e899f37d8c2ddff4dcc663/sqlalchemy-2.0.52-cp313-cp313-win32.whl", hash = "sha256:c63bda077685c85ca513286547a531ba57e7a68cf0a7ed3bafcc2bbd18896f4d", size = 2127308, upload-time = "2026-08-11T21:14:53.879Z" }, + { url = "https://files.pythonhosted.org/packages/96/4e/226eda27654318ce525d043025221f689abef883da2c7126f9065121618c/sqlalchemy-2.0.52-cp313-cp313-win_amd64.whl", hash = "sha256:9876b09b9f1ce7398b0ffece585c0a911244c53191187341f6bcae640e133751", size = 2153876, upload-time = "2026-08-11T21:14:55.527Z" }, + { url = "https://files.pythonhosted.org/packages/b3/3f/3582293d1e185e71d19d7c731c3e2ee20ba21981c4a1115c0806c1f62120/sqlalchemy-2.0.52-py3-none-any.whl", hash = "sha256:3b81b8363a919ce53453591cdb93702e6bd54ade6c4fa2f468fc053baee5ed89", size = 1950700, upload-time = "2026-08-11T20:47:21.603Z" }, +] + [[package]] name = "starlette" version = "1.6.0" @@ -551,6 +722,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", size = 14750, upload-time = "2026-08-12T12:37:24.648Z" }, ] +[[package]] +name = "tzdata" +version = "2026.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/92/ff/5a28bdfd8c3ebec42564ac7d0e54ca3db65044a9314a97f9564fa7a1e926/tzdata-2026.3.tar.gz", hash = "sha256:4a1518b8993086a7982523e071643f3c0e5f213e75b21318e78bcabfff9d1415", size = 198674, upload-time = "2026-07-10T08:50:37.887Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/6d/b53b99a9f2766d095985947a5782f1702cabb129a34f7a802d7197af832f/tzdata-2026.3-py2.py3-none-any.whl", hash = "sha256:dc096730c87af6cab1b171c9d532be840741ff5d459015e7f6947bd7d7e54931", size = 348168, upload-time = "2026-07-10T08:50:36.46Z" }, +] + [[package]] name = "uvicorn" version = "0.52.4"