diff --git a/README.md b/README.md index 84d6c35..ae7e7cd 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,30 @@ FORGEJO_PAT=forgejo_pat_xxxxxxxxxxxx When using the provided Docker Compose example, DATABASE_URL is injected automatically. For other deployment approaches (e.g., bare metal, Kubernetes), you must supply DATABASE_URL yourself. +### 4. Register an OAuth application in Forgejo + +The web service authenticates users via Forgejo OAuth. You need to register Myst as an OAuth consumer: + +1. In Forgejo, go to **Settings** → **Applications** → **Create OAuth2 Application** +2. Set the redirect URI to `https://your-myst-domain.com/auth/callback/forgejo` (or `http://localhost:8000/auth/callback/forgejo` for local dev) +3. Copy the **Client ID** and **Client Secret** Forgejo gives you +4. Generate a Fernet encryption key for OAuth token storage: + + ```bash + python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" + ``` + +5. Add these to your `.env`: + + ```env + FORGEJO_OAUTH_CLIENT_ID=your_client_id + FORGEJO_OAUTH_CLIENT_SECRET=your_client_secret + OAUTH_TOKEN_ENCRYPTION_KEY=your_fernet_key_from_step_4 + MYST_PUBLIC_BASE_URL=https://your-myst-domain.com # omit trailing slash; omit for local dev + ``` + + `MYST_PUBLIC_BASE_URL` is used as the OAuth redirect URI base. In local development, the redirect URI is inferred from the request (Default: `http://localhost:8000/auth/callback/forgejo`). In production, set this to your public Myst domain. + ## Phase 1 Progress - [x] Project renamed from Embargo to Myst diff --git a/agents.md b/agents.md index 1237786..24f67b2 100644 --- a/agents.md +++ b/agents.md @@ -66,4 +66,28 @@ This file is the single source of truth for codebase obstacles, oddities, and th **Area:** CLI commands using process.exit() **Obstacle:** process.exit(0) stops execution immediately, never runs cleanup code. **Solution:** Use process.exitCode = 1 and return instead of process.exit(). -**Preference:** Set exitCode and return to allow cleanup. \ No newline at end of file +**Preference:** Set exitCode and return to allow cleanup. + +### Logout cookie not reaching browser +**Area:** web/app/routers/auth.py, web/app/auth/session.py +**Obstacle:** `revoke_session` set cookies on the injected `Response` parameter, but the logout handler returned a new `RedirectResponse` — so `Set-Cookie` was discarded. +**Solution:** Create `RedirectResponse` first, then pass it into `revoke_session`. Same pattern used in `callback_forgejo` for `create_session`. +**Preference:** Pass the actual response object that will be returned. + +### Dashboard leaking ORM session object +**Area:** web/app/main.py +**Obstacle:** `/dashboard` returned the full ORM `Session` object (`sess`), leaking `token_hash`, `revoked_at`, etc. to the client. +**Solution:** Return a plain dict with only safe fields: `user_id`, `display_name`, `email`, `session_id`, `created_at`. +**Preference:** Never return ORM objects directly in API responses. + +### crypto.py decrypt functions kept proactively +**Area:** web/app/auth/crypto.py +**Obstacle:** CodeRabbit flagged missing decryption functions and key validation. Added `decrypt_oauth_token`/`decrypt_optional` + key format validation in `fernet_from_encryption_key`. +**Solution:** Added the functions even though no consumer exists yet. They will be used for PAT decryption in share link flow. +**Preference:** Keep dead code if it's small, symmetric (`encrypt`/`decrypt`), and has an obvious future consumer. + +### User model Session import direct instead of TYPE_CHECKING +**Area:** web/app/models/user.py +**Obstacle:** `Session` was imported directly (`from .session import Session`) while `Grant` used `TYPE_CHECKING`. Inconsistent and risked circular imports. +**Solution:** Moved `Session` import under `TYPE_CHECKING`, changed relationship to string ref `"Session"`. +**Preference:** Always use `TYPE_CHECKING` for model references within models to avoid circular imports. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 7444a00..7b9efc6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,7 @@ services: dockerfile: Dockerfile ports: - "8000:8000" + env_file: ./web/.env environment: - DATABASE_URL=postgresql+asyncpg://myst:myst@db:5432/myst_db depends_on: diff --git a/packages/cli/src/cli-router.ts b/packages/cli/src/cli-router.ts index e45002c..0ce5201 100644 --- a/packages/cli/src/cli-router.ts +++ b/packages/cli/src/cli-router.ts @@ -107,11 +107,13 @@ function showCommandHelp( lines.push(""); } - const hasSubcommands = cmdConf.subcommands && Object.keys(cmdConf.subcommands).length > 0; + const hasSubcommands = + cmdConf.subcommands && Object.keys(cmdConf.subcommands).length > 0; const usageCmd = subcommand ? `${command} ${subcommand}` : command; - const usageLine = hasSubcommands && !subcommand - ? `myst ${command} [options]` - : `myst ${usageCmd} [options]`; + const usageLine = + hasSubcommands && !subcommand + ? `myst ${command} [options]` + : `myst ${usageCmd} [options]`; lines.push(c.bold("Usage:")); lines.push(`${INDENT}${usageLine}`); lines.push(""); diff --git a/web/app/auth/__init__.py b/web/app/auth/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/web/app/auth/crypto.py b/web/app/auth/crypto.py new file mode 100644 index 0000000..52807b5 --- /dev/null +++ b/web/app/auth/crypto.py @@ -0,0 +1,58 @@ +"""Fernet (AES) encryption for OAuth tokens at rest.""" + +from __future__ import annotations + +from cryptography.fernet import Fernet, InvalidToken +from pydantic import SecretStr + + +def fernet_from_encryption_key(key: SecretStr) -> Fernet | None: + raw = key.get_secret_value().strip() + if not raw: + return None + try: + return Fernet(raw.encode()) + except Exception as e: + msg = ( + f"Invalid OAUTH_TOKEN_ENCRYPTION_KEY: {e}. " + "Generate a valid key with cryptography.fernet.Fernet.generate_key().decode()" + ) + raise ValueError(msg) from e + + +def encrypt_oauth_token(fernet: Fernet, raw_token: str) -> str: + return fernet.encrypt(raw_token.encode()).decode() + + +def encrypt_optional(fernet: Fernet | None, raw_token: str | None) -> str | None: + if raw_token is None: + return None + if fernet is None: + msg = ( + "OAuth token encryption is not configured: set OAUTH_TOKEN_ENCRYPTION_KEY " + "to the output of cryptography.fernet.Fernet.generate_key().decode()" + ) + raise ValueError(msg) + return encrypt_oauth_token(fernet, raw_token) + + +def decrypt_oauth_token(fernet: Fernet, encrypted_token: str) -> str: + try: + return fernet.decrypt(encrypted_token.encode()).decode() + except InvalidToken: + raise ValueError( + "Cannot decrypt stored token — the encryption key may have changed or the " + "token data is corrupted. The user may need to re-connect their account." + ) from None + + +def decrypt_optional(fernet: Fernet | None, encrypted_token: str | None) -> str | None: + if encrypted_token is None: + return None + if fernet is None: + msg = ( + "OAuth token encryption is not configured: set OAUTH_TOKEN_ENCRYPTION_KEY " + "to the output of cryptography.fernet.Fernet.generate_key().decode()" + ) + raise ValueError(msg) + return decrypt_oauth_token(fernet, encrypted_token) diff --git a/web/app/auth/identity.py b/web/app/auth/identity.py new file mode 100644 index 0000000..2e744ac --- /dev/null +++ b/web/app/auth/identity.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from datetime import datetime + +from sqlalchemy import select +from sqlalchemy.ext.asyncio import AsyncSession +from sqlalchemy.orm import selectinload + +from app.auth.crypto import encrypt_optional, fernet_from_encryption_key +from app.config import Settings +from app.models.user import LinkedIdentity, User + + +async def find_or_create_user( + db: AsyncSession, + settings: Settings, + *, + provider: str, + provider_user_id: str, + provider_username: str, + email: str | None, + access_token_raw: str | None, + access_token_expires_at: datetime | None, + refresh_token_raw: str | None, +) -> User: + """Find or create a user based on the given provider and identity details.""" + + # Create a Fernet instance for encrypting tokens if a key is available + fernet = fernet_from_encryption_key(settings.oauth_token_encryption_key) + + # Query the database for an existing identity + result = await db.execute( + select(LinkedIdentity) + .options(selectinload(LinkedIdentity.user)) + .where( + LinkedIdentity.provider == provider, + LinkedIdentity.provider_user_id == provider_user_id, + ) + ) + identity = result.scalar_one_or_none() + + # Update the identity and user if identity exists + if identity: + identity.provider_username = provider_username + if access_token_raw is not None: + identity.access_token_encrypted = encrypt_optional(fernet, access_token_raw) + identity.access_token_expires_at = access_token_expires_at + if refresh_token_raw is not None: + identity.refresh_token_encrypted = encrypt_optional(fernet, refresh_token_raw) + user = identity.user + if email: + user.email = email + if not user.display_name: + user.display_name = provider_username + await db.commit() + await db.refresh(user) + return user + + user = User(email=email, display_name=provider_username) + db.add(user) + await db.flush() + + linked = LinkedIdentity( + user_id=user.id, + provider=provider, + provider_user_id=provider_user_id, + provider_username=provider_username, + access_token_encrypted=encrypt_optional(fernet, access_token_raw), + access_token_expires_at=access_token_expires_at, + refresh_token_encrypted=encrypt_optional(fernet, refresh_token_raw), + ) + db.add(linked) + await db.commit() + await db.refresh(user) + return user diff --git a/web/app/auth/session.py b/web/app/auth/session.py new file mode 100644 index 0000000..992e791 --- /dev/null +++ b/web/app/auth/session.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +import hashlib +import secrets +import uuid +from datetime import UTC, datetime, timedelta + +from fastapi import Cookie, Depends, HTTPException, Response, status +from sqlalchemy import select, update +from sqlalchemy.ext.asyncio import AsyncSession +from sqlalchemy.orm import selectinload + +from app.deps import get_db +from app.models.session import Session + +SESSION_COOKIE = "myst_session" +SESSION_DURATION_DAYS = 7 + + +async def create_session( + db: AsyncSession, response: Response, user_id: uuid.UUID, secure: bool = True +) -> None: + raw_token = secrets.token_hex(32) + token_hash = hashlib.sha256(raw_token.encode()).hexdigest() + expires_at = datetime.now(UTC) + timedelta(days=SESSION_DURATION_DAYS) + row = Session( + user_id=user_id, + token_hash=token_hash, + expires_at=expires_at, + ) + db.add(row) + await db.commit() + response.set_cookie( + key=SESSION_COOKIE, + value=raw_token, + httponly=True, + samesite="lax", + secure=secure, + max_age=60 * 60 * 24 * SESSION_DURATION_DAYS, + path="/", + ) + + +async def get_current_session( + db: AsyncSession = Depends(get_db), + myst_session: str | None = Cookie(default=None), +) -> Session: + if not myst_session: + raise HTTPException( + status_code=status.HTTP_401_UNAUTHORIZED, + detail="Not signed in", + ) + token_hash = hashlib.sha256(myst_session.encode()).hexdigest() + now = datetime.now(UTC) + stmt = ( + select(Session) + .options(selectinload(Session.user)) + .where( + Session.token_hash == token_hash, + Session.expires_at > now, + Session.revoked_at.is_(None), + ) + ) + result = await db.execute(stmt) + sess = result.scalar_one_or_none() + if sess is None: + raise HTTPException( + status_code=status.HTTP_401_UNAUTHORIZED, + detail="Session invalid or expired", + ) + sess.last_seen_at = now + await db.commit() + await db.refresh(sess, attribute_names=["user"]) + return sess + + +async def revoke_session(db: AsyncSession, response: Response, myst_session: str | None) -> None: + response.delete_cookie( + key=SESSION_COOKIE, + path="/", + samesite="lax", + httponly=True, + ) + if not myst_session: + return + token_hash = hashlib.sha256(myst_session.encode()).hexdigest() + await db.execute( + update(Session) + .where(Session.token_hash == token_hash, Session.revoked_at.is_(None)) + .values(revoked_at=datetime.now(UTC)) + ) + await db.commit() diff --git a/web/app/config.py b/web/app/config.py index 74ca59d..76b1870 100644 --- a/web/app/config.py +++ b/web/app/config.py @@ -13,7 +13,12 @@ class Settings(BaseSettings): app_name: str = "Myst" database_url: str = "postgresql+asyncpg://myst:myst@db:5432/myst_db" # Default for Docker Compose; override with DATABASE_URL env var in production forgejo_base_url: str = "" - forgejo_pat: SecretStr = SecretStr("") + forgejo_oauth_client_id: str = "" + forgejo_oauth_client_secret: SecretStr = SecretStr("") + # Public Myst base URL for OAuth redirect_uri (no trailing slash). If empty, Request.base_url is used. + myst_public_base_url: str = "" + # URL-safe base64 Fernet key (see `cryptography.fernet.Fernet.generate_key()`). Required to persist OAuth tokens and user PATs. + oauth_token_encryption_key: SecretStr = SecretStr("") model_config = SettingsConfigDict(env_file=str(env_file)) diff --git a/web/app/deps.py b/web/app/deps.py new file mode 100644 index 0000000..2c9e69b --- /dev/null +++ b/web/app/deps.py @@ -0,0 +1,10 @@ +from collections.abc import AsyncGenerator + +from fastapi import Request +from sqlalchemy.ext.asyncio import AsyncSession + + +async def get_db(request: Request) -> AsyncGenerator[AsyncSession, None]: + """Yield a request-scoped async database session.""" + async with request.app.state.db_session() as session: + yield session diff --git a/web/app/main.py b/web/app/main.py index 717402f..aa7fe72 100644 --- a/web/app/main.py +++ b/web/app/main.py @@ -1,12 +1,14 @@ from contextlib import asynccontextmanager -from typing import AsyncGenerator -from fastapi import FastAPI +from fastapi import Depends, FastAPI from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine +import app.models # noqa: F401 - register ORM tables on metadata +from app.auth.session import get_current_session from app.config import get_settings from app.database import Base -from app.routers import links +from app.models.session import Session as UserBrowserSession +from app.routers import auth, links @asynccontextmanager @@ -29,17 +31,23 @@ async def lifespan(app: FastAPI): await engine.dispose() # Close all connections on shutdown -async def get_db() -> AsyncGenerator[AsyncSession, None]: - """Dependency that provides a database session.""" - async with app.state.db_session() as session: - yield session - - app = FastAPI(lifespan=lifespan) +app.include_router(auth.router) app.include_router(links.router) @app.get("/") async def root(): return {"message": "Welcome to Myst"} + + +@app.get("/dashboard") +async def dashboard(sess: UserBrowserSession = Depends(get_current_session)): + return { + "user_id": str(sess.user.id), + "display_name": sess.user.display_name, + "email": sess.user.email, + "session_id": str(sess.id), + "created_at": sess.created_at.isoformat(), + } diff --git a/web/app/models/__init__.py b/web/app/models/__init__.py index e69de29..01acd7e 100644 --- a/web/app/models/__init__.py +++ b/web/app/models/__init__.py @@ -0,0 +1,7 @@ +"""Import ORM modules so ``Base.metadata`` is populated before ``create_all``.""" + +from app.models.grant import Grant +from app.models.session import Session +from app.models.user import LinkedIdentity, User + +__all__ = ["Grant", "LinkedIdentity", "Session", "User"] diff --git a/web/app/models/grant.py b/web/app/models/grant.py index 763c76d..dc9a3fe 100644 --- a/web/app/models/grant.py +++ b/web/app/models/grant.py @@ -1,12 +1,17 @@ +from __future__ import annotations + import uuid from datetime import datetime -from typing import Literal, get_args +from typing import TYPE_CHECKING, Literal, get_args -from sqlalchemy import Enum, String, Uuid, func -from sqlalchemy.orm import Mapped, mapped_column +from sqlalchemy import Enum, ForeignKey, String, Uuid, func +from sqlalchemy.orm import Mapped, mapped_column, relationship from app.database import Base +if TYPE_CHECKING: + from .user import User + GrantType = Literal["public", "private"] @@ -16,10 +21,14 @@ class Grant(Base): id: Mapped[uuid.UUID] = mapped_column( Uuid, primary_key=True, - server_default=func.gen_random_uuid(), # Postgres-specific (native on 13+) + server_default=func.gen_random_uuid(), + ) + token_hash: Mapped[str] = mapped_column(String, unique=True, nullable=False, index=True) + user_id: Mapped[uuid.UUID] = mapped_column( + Uuid, ForeignKey("users.id", ondelete="CASCADE"), nullable=False ) - token: Mapped[str] = mapped_column(String, unique=True, nullable=False, index=True) created_at: Mapped[datetime] = mapped_column(server_default=func.now()) + expires_at: Mapped[datetime] = mapped_column(nullable=False) revoked_at: Mapped[datetime | None] = mapped_column(nullable=True) repo_owner: Mapped[str] = mapped_column(String, nullable=False) repo_name: Mapped[str] = mapped_column(String, nullable=False) @@ -30,3 +39,5 @@ class Grant(Base): default="public", ) recipient_email: Mapped[str | None] = mapped_column(String, nullable=True) + + user: Mapped[User] = relationship("User", back_populates="grants") diff --git a/web/app/models/session.py b/web/app/models/session.py new file mode 100644 index 0000000..a9bbb61 --- /dev/null +++ b/web/app/models/session.py @@ -0,0 +1,31 @@ +from __future__ import annotations + +import uuid +from datetime import datetime +from typing import TYPE_CHECKING + +from sqlalchemy import ForeignKey, String, Uuid, func +from sqlalchemy.orm import Mapped, mapped_column, relationship + +from app.database import Base + +if TYPE_CHECKING: + from app.models.user import User + + +class Session(Base): + __tablename__ = "sessions" + + id: Mapped[uuid.UUID] = mapped_column( + Uuid, primary_key=True, server_default=func.gen_random_uuid() + ) + user_id: Mapped[uuid.UUID] = mapped_column( + Uuid, ForeignKey("users.id", ondelete="CASCADE"), nullable=False + ) + token_hash: Mapped[str] = mapped_column(String(64), unique=True, nullable=False, index=True) + created_at: Mapped[datetime] = mapped_column(server_default=func.now()) + expires_at: Mapped[datetime] = mapped_column(nullable=False, index=True) + last_seen_at: Mapped[datetime | None] = mapped_column(nullable=True) + revoked_at: Mapped[datetime | None] = mapped_column(nullable=True) + + user: Mapped[User] = relationship("User", back_populates="sessions") diff --git a/web/app/models/user.py b/web/app/models/user.py new file mode 100644 index 0000000..297d1b7 --- /dev/null +++ b/web/app/models/user.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +import uuid +from datetime import datetime +from typing import TYPE_CHECKING + +from sqlalchemy import ForeignKey, String, Text, UniqueConstraint, Uuid, func +from sqlalchemy.orm import Mapped, mapped_column, relationship + +from app.database import Base + +if TYPE_CHECKING: + from .grant import Grant + from .session import Session + + +class User(Base): + __tablename__ = "users" + + id: Mapped[uuid.UUID] = mapped_column( + Uuid, primary_key=True, server_default=func.gen_random_uuid() + ) + display_name: Mapped[str | None] = mapped_column(String, nullable=True) + email: Mapped[str | None] = mapped_column(String, nullable=True, index=True) + pat_encrypted: Mapped[str | None] = mapped_column(Text, nullable=True) + created_at: Mapped[datetime] = mapped_column(server_default=func.now()) + + identities: Mapped[list[LinkedIdentity]] = relationship( + back_populates="user", + cascade="all, delete-orphan", + ) + sessions: Mapped[list[Session]] = relationship( + "Session", + back_populates="user", + cascade="all, delete-orphan", + ) + grants: Mapped[list[Grant]] = relationship( + "Grant", + back_populates="user", + ) + + +class LinkedIdentity(Base): + __tablename__ = "linked_identities" + + id: Mapped[uuid.UUID] = mapped_column( + Uuid, primary_key=True, server_default=func.gen_random_uuid() + ) + user_id: Mapped[uuid.UUID] = mapped_column( + Uuid, ForeignKey("users.id", ondelete="CASCADE"), nullable=False, index=True + ) + provider: Mapped[str] = mapped_column(String, nullable=False) + provider_user_id: Mapped[str] = mapped_column(String, nullable=False) + provider_username: Mapped[str] = mapped_column(String, nullable=False) + access_token_encrypted: Mapped[str | None] = mapped_column(Text, nullable=True) + access_token_expires_at: Mapped[datetime | None] = mapped_column(nullable=True) + refresh_token_encrypted: Mapped[str | None] = mapped_column(Text, nullable=True) + created_at: Mapped[datetime] = mapped_column(server_default=func.now()) + + user: Mapped[User] = relationship(back_populates="identities") + + __table_args__ = (UniqueConstraint("provider", "provider_user_id"),) diff --git a/web/app/routers/auth.py b/web/app/routers/auth.py new file mode 100644 index 0000000..b63dd6b --- /dev/null +++ b/web/app/routers/auth.py @@ -0,0 +1,228 @@ +from __future__ import annotations + +import secrets +from datetime import UTC, datetime, timedelta +from urllib.parse import urlencode + +import httpx +from fastapi import APIRouter, Cookie, Depends, HTTPException, Request, Response, status +from fastapi.responses import RedirectResponse +from sqlalchemy.ext.asyncio import AsyncSession + +from app.auth.identity import find_or_create_user +from app.auth.session import create_session, revoke_session +from app.config import Settings, get_settings +from app.deps import get_db + +router = APIRouter(prefix="/auth", tags=["auth"]) + + +# ── Forgejo API client ── + + +async def _forgejo_post(settings: Settings, path: str, data: dict) -> dict: + url = f"{settings.forgejo_base_url.rstrip('/')}{path}" + try: + async with httpx.AsyncClient(timeout=30.0) as client: + resp = await client.post(url, data=data, headers={"Accept": "application/json"}) + except httpx.RequestError as exc: + raise HTTPException( + status_code=status.HTTP_502_BAD_GATEWAY, + detail=f"Cannot reach Forgejo: {exc}", + ) from exc + if resp.status_code != 200: + raise HTTPException( + status_code=status.HTTP_502_BAD_GATEWAY, + detail=(f"Forgejo API error {resp.status_code} at {path}: {resp.text[:500]}"), + ) + return resp.json() + + +async def _forgejo_get(settings: Settings, path: str, token: str) -> dict: + url = f"{settings.forgejo_base_url.rstrip('/')}{path}" + try: + async with httpx.AsyncClient(timeout=30.0) as client: + resp = await client.get(url, headers={"Authorization": f"token {token}"}) + except httpx.RequestError as exc: + raise HTTPException( + status_code=status.HTTP_502_BAD_GATEWAY, + detail=f"Cannot reach Forgejo: {exc}", + ) from exc + if resp.status_code != 200: + raise HTTPException( + status_code=status.HTTP_502_BAD_GATEWAY, + detail=(f"Forgejo API error {resp.status_code} at {path}: {resp.text[:500]}"), + ) + return resp.json() + + +# ── OAuth CSRF helpers ── + + +def _set_oauth_state_cookie(response: Response, state: str) -> None: + response.set_cookie( + key="oauth_state", + value=state, + httponly=True, + samesite="lax", + path="/", + max_age=600, + ) + + +def _verify_oauth_state(state: str | None, oauth_state: str | None) -> None: + if not state or not oauth_state or not secrets.compare_digest(state, oauth_state): + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail="OAuth state mismatch. Possible CSRF attack.", + ) + + +# ── Forgejo response parsers ── + + +def _parse_token_response(data: dict) -> tuple[str, str | None, datetime | None]: + access_token = data.get("access_token") + if not access_token or not isinstance(access_token, str): + raise HTTPException( + status_code=status.HTTP_502_BAD_GATEWAY, + detail="Forgejo OAuth response did not include an access_token.", + ) + refresh_token = data.get("refresh_token") + refresh_plain = refresh_token if isinstance(refresh_token, str) else None + expires_in = data.get("expires_in") + if expires_in is not None: + expires_at = datetime.now(UTC) + timedelta(seconds=int(expires_in)) + else: + expires_at = None + return access_token, refresh_plain, expires_at + + +def _parse_user_response(data: dict) -> tuple[str, str, str | None]: + provider_user_id = str(data.get("id", "")).strip() + provider_username = str(data.get("login", "")).strip() + if not provider_user_id or not provider_username: + raise HTTPException( + status_code=status.HTTP_502_BAD_GATEWAY, + detail="Forgejo user response missing id or login.", + ) + email_val = data.get("email") + email = email_val if isinstance(email_val, str) and email_val.strip() else None + return provider_user_id, provider_username, email + + +# ── OAuth config helpers ── + + +def _forgejo_oauth_redirect_uri(request: Request, settings: Settings) -> str: + base_url = settings.myst_public_base_url.strip().rstrip("/") + if base_url: + return f"{base_url}/auth/callback/forgejo" + return str(request.url_for("forgejo_oauth_callback")) + + +def _require_forgejo_oauth_config(settings: Settings) -> None: + if not settings.forgejo_base_url.strip(): + raise HTTPException( + status_code=status.HTTP_503_SERVICE_UNAVAILABLE, + detail="Forgejo is not configured: set FORGEJO_BASE_URL in the environment.", + ) + if not settings.forgejo_oauth_client_id.strip(): + raise HTTPException( + status_code=status.HTTP_503_SERVICE_UNAVAILABLE, + detail="Forgejo OAuth is not configured: set FORGEJO_OAUTH_CLIENT_ID in the environment.", + ) + secret = settings.forgejo_oauth_client_secret.get_secret_value().strip() + if not secret: + raise HTTPException( + status_code=status.HTTP_503_SERVICE_UNAVAILABLE, + detail="Forgejo OAuth is not configured: set FORGEJO_OAUTH_CLIENT_SECRET in the environment.", + ) + + +# ── Routes ── + + +@router.get("/login/forgejo") +async def login_forgejo( + request: Request, settings: Settings = Depends(get_settings) +) -> RedirectResponse: + _require_forgejo_oauth_config(settings) + + redirect_uri = _forgejo_oauth_redirect_uri(request, settings) + state = secrets.token_urlsafe(32) + query = urlencode( + { + "client_id": settings.forgejo_oauth_client_id, + "response_type": "code", + "redirect_uri": redirect_uri, + "state": state, + } + ) + authorization_url = f"{settings.forgejo_base_url.rstrip('/')}/login/oauth/authorize?{query}" + response = RedirectResponse(authorization_url, status_code=status.HTTP_302_FOUND) + _set_oauth_state_cookie(response, state) + return response + + +@router.get("/callback/forgejo", name="forgejo_oauth_callback") +async def callback_forgejo( + request: Request, + db: AsyncSession = Depends(get_db), + settings: Settings = Depends(get_settings), + code: str | None = None, + state: str | None = None, + oauth_state: str | None = Cookie(default=None), +) -> RedirectResponse: + _require_forgejo_oauth_config(settings) + _verify_oauth_state(state, oauth_state) + + if not code: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail="Forgejo did not return an authorization code. The user may have denied consent.", + ) + + redirect = RedirectResponse("/dashboard", status_code=status.HTTP_302_FOUND) + redirect.delete_cookie("oauth_state") + + token_data = await _forgejo_post( + settings, + "/login/oauth/access_token", + { + "grant_type": "authorization_code", + "client_id": settings.forgejo_oauth_client_id, + "client_secret": settings.forgejo_oauth_client_secret.get_secret_value(), + "code": code, + "redirect_uri": _forgejo_oauth_redirect_uri(request, settings), + }, + ) + access_token, refresh_plain, expires_at = _parse_token_response(token_data) + + user_data = await _forgejo_get(settings, "/api/v1/user", access_token) + provider_user_id, provider_username, email = _parse_user_response(user_data) + + user = await find_or_create_user( + db, + settings, + provider="forgejo", + provider_user_id=provider_user_id, + provider_username=provider_username, + email=email, + access_token_raw=access_token, + access_token_expires_at=expires_at, + refresh_token_raw=refresh_plain, + ) + + await create_session(db, redirect, user.id, secure=request.url.scheme == "https") + return redirect + + +@router.get("/logout") +async def logout( + db: AsyncSession = Depends(get_db), + myst_session: str | None = Cookie(default=None), +) -> RedirectResponse: + redirect = RedirectResponse("/", status_code=status.HTTP_302_FOUND) + await revoke_session(db, redirect, myst_session) + return redirect diff --git a/web/pyproject.toml b/web/pyproject.toml index 4dfcebd..24a9aab 100644 --- a/web/pyproject.toml +++ b/web/pyproject.toml @@ -1,3 +1,7 @@ +[tool.ruff] +target-version = "py313" +line-length = 100 + [project] name = "myst-web" version = "0.1.0" @@ -5,7 +9,9 @@ description = "Myst: FastAPI + HTMX web interface for managing Forgejo repositor requires-python = ">=3.13" dependencies = [ "asyncpg>=0.31.0", + "cryptography>=46.0.0", "fastapi>=0.136.0", + "httpx>=0.28.1", "pydantic-settings>=2.13.1", "pydantic[email]>=2.13.2", "sqlalchemy[asyncio]>=2.0.49", @@ -13,5 +19,6 @@ dependencies = [ [dependency-groups] dev = [ + "ruff>=0.11.0", "uvicorn[standard]>=0.44.0", ] diff --git a/web/uv.lock b/web/uv.lock index 25216e3..aeae6ef 100644 --- a/web/uv.lock +++ b/web/uv.lock @@ -64,6 +64,60 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/3c/d7/8fb3044eaef08a310acfe23dae9a8e2e07d305edc29a53497e52bc76eca7/asyncpg-0.31.0-cp314-cp314t-win_amd64.whl", hash = "sha256:bd4107bb7cdd0e9e65fae66a62afd3a249663b844fa34d479f6d5b3bef9c04c3", size = 706062, upload-time = "2025-11-24T23:26:44.086Z" }, ] +[[package]] +name = "certifi" +version = "2026.4.22" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/25/ee/6caf7a40c36a1220410afe15a1cc64993a1f864871f698c0f93acb72842a/certifi-2026.4.22.tar.gz", hash = "sha256:8d455352a37b71bf76a79caa83a3d6c25afee4a385d632127b6afb3963f1c580", size = 137077, upload-time = "2026-04-22T11:26:11.191Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/30/7cd8fdcdfbc5b869528b079bfb76dcdf6056b1a2097a662e5e8c04f42965/certifi-2026.4.22-py3-none-any.whl", hash = "sha256:3cb2210c8f88ba2318d29b0388d1023c8492ff72ecdde4ebdaddbb13a31b1c4a", size = 135707, upload-time = "2026-04-22T11:26:09.372Z" }, +] + +[[package]] +name = "cffi" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycparser", marker = "implementation_name != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4b/8d/a0a47a0c9e413a658623d014e91e74a50cdd2c423f7ccfd44086ef767f90/cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb", size = 185230, upload-time = "2025-09-08T23:23:00.879Z" }, + { url = "https://files.pythonhosted.org/packages/4a/d2/a6c0296814556c68ee32009d9c2ad4f85f2707cdecfd7727951ec228005d/cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca", size = 181043, upload-time = "2025-09-08T23:23:02.231Z" }, + { url = "https://files.pythonhosted.org/packages/b0/1e/d22cc63332bd59b06481ceaac49d6c507598642e2230f201649058a7e704/cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b", size = 212446, upload-time = "2025-09-08T23:23:03.472Z" }, + { url = "https://files.pythonhosted.org/packages/a9/f5/a2c23eb03b61a0b8747f211eb716446c826ad66818ddc7810cc2cc19b3f2/cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b", size = 220101, upload-time = "2025-09-08T23:23:04.792Z" }, + { url = "https://files.pythonhosted.org/packages/f2/7f/e6647792fc5850d634695bc0e6ab4111ae88e89981d35ac269956605feba/cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2", size = 207948, upload-time = "2025-09-08T23:23:06.127Z" }, + { url = "https://files.pythonhosted.org/packages/cb/1e/a5a1bd6f1fb30f22573f76533de12a00bf274abcdc55c8edab639078abb6/cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3", size = 206422, upload-time = "2025-09-08T23:23:07.753Z" }, + { url = "https://files.pythonhosted.org/packages/98/df/0a1755e750013a2081e863e7cd37e0cdd02664372c754e5560099eb7aa44/cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26", size = 219499, upload-time = "2025-09-08T23:23:09.648Z" }, + { url = "https://files.pythonhosted.org/packages/50/e1/a969e687fcf9ea58e6e2a928ad5e2dd88cc12f6f0ab477e9971f2309b57c/cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c", size = 222928, upload-time = "2025-09-08T23:23:10.928Z" }, + { url = "https://files.pythonhosted.org/packages/36/54/0362578dd2c9e557a28ac77698ed67323ed5b9775ca9d3fe73fe191bb5d8/cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b", size = 221302, upload-time = "2025-09-08T23:23:12.42Z" }, + { url = "https://files.pythonhosted.org/packages/eb/6d/bf9bda840d5f1dfdbf0feca87fbdb64a918a69bca42cfa0ba7b137c48cb8/cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27", size = 172909, upload-time = "2025-09-08T23:23:14.32Z" }, + { url = "https://files.pythonhosted.org/packages/37/18/6519e1ee6f5a1e579e04b9ddb6f1676c17368a7aba48299c3759bbc3c8b3/cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75", size = 183402, upload-time = "2025-09-08T23:23:15.535Z" }, + { url = "https://files.pythonhosted.org/packages/cb/0e/02ceeec9a7d6ee63bb596121c2c8e9b3a9e150936f4fbef6ca1943e6137c/cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91", size = 177780, upload-time = "2025-09-08T23:23:16.761Z" }, + { url = "https://files.pythonhosted.org/packages/92/c4/3ce07396253a83250ee98564f8d7e9789fab8e58858f35d07a9a2c78de9f/cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5", size = 185320, upload-time = "2025-09-08T23:23:18.087Z" }, + { url = "https://files.pythonhosted.org/packages/59/dd/27e9fa567a23931c838c6b02d0764611c62290062a6d4e8ff7863daf9730/cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13", size = 181487, upload-time = "2025-09-08T23:23:19.622Z" }, + { url = "https://files.pythonhosted.org/packages/d6/43/0e822876f87ea8a4ef95442c3d766a06a51fc5298823f884ef87aaad168c/cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b", size = 220049, upload-time = "2025-09-08T23:23:20.853Z" }, + { url = "https://files.pythonhosted.org/packages/b4/89/76799151d9c2d2d1ead63c2429da9ea9d7aac304603de0c6e8764e6e8e70/cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c", size = 207793, upload-time = "2025-09-08T23:23:22.08Z" }, + { url = "https://files.pythonhosted.org/packages/bb/dd/3465b14bb9e24ee24cb88c9e3730f6de63111fffe513492bf8c808a3547e/cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef", size = 206300, upload-time = "2025-09-08T23:23:23.314Z" }, + { url = "https://files.pythonhosted.org/packages/47/d9/d83e293854571c877a92da46fdec39158f8d7e68da75bf73581225d28e90/cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775", size = 219244, upload-time = "2025-09-08T23:23:24.541Z" }, + { url = "https://files.pythonhosted.org/packages/2b/0f/1f177e3683aead2bb00f7679a16451d302c436b5cbf2505f0ea8146ef59e/cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205", size = 222828, upload-time = "2025-09-08T23:23:26.143Z" }, + { url = "https://files.pythonhosted.org/packages/c6/0f/cafacebd4b040e3119dcb32fed8bdef8dfe94da653155f9d0b9dc660166e/cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1", size = 220926, upload-time = "2025-09-08T23:23:27.873Z" }, + { url = "https://files.pythonhosted.org/packages/3e/aa/df335faa45b395396fcbc03de2dfcab242cd61a9900e914fe682a59170b1/cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f", size = 175328, upload-time = "2025-09-08T23:23:44.61Z" }, + { url = "https://files.pythonhosted.org/packages/bb/92/882c2d30831744296ce713f0feb4c1cd30f346ef747b530b5318715cc367/cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25", size = 185650, upload-time = "2025-09-08T23:23:45.848Z" }, + { url = "https://files.pythonhosted.org/packages/9f/2c/98ece204b9d35a7366b5b2c6539c350313ca13932143e79dc133ba757104/cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad", size = 180687, upload-time = "2025-09-08T23:23:47.105Z" }, + { url = "https://files.pythonhosted.org/packages/3e/61/c768e4d548bfa607abcda77423448df8c471f25dbe64fb2ef6d555eae006/cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9", size = 188773, upload-time = "2025-09-08T23:23:29.347Z" }, + { url = "https://files.pythonhosted.org/packages/2c/ea/5f76bce7cf6fcd0ab1a1058b5af899bfbef198bea4d5686da88471ea0336/cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d", size = 185013, upload-time = "2025-09-08T23:23:30.63Z" }, + { url = "https://files.pythonhosted.org/packages/be/b4/c56878d0d1755cf9caa54ba71e5d049479c52f9e4afc230f06822162ab2f/cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c", size = 221593, upload-time = "2025-09-08T23:23:31.91Z" }, + { url = "https://files.pythonhosted.org/packages/e0/0d/eb704606dfe8033e7128df5e90fee946bbcb64a04fcdaa97321309004000/cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8", size = 209354, upload-time = "2025-09-08T23:23:33.214Z" }, + { url = "https://files.pythonhosted.org/packages/d8/19/3c435d727b368ca475fb8742ab97c9cb13a0de600ce86f62eab7fa3eea60/cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc", size = 208480, upload-time = "2025-09-08T23:23:34.495Z" }, + { url = "https://files.pythonhosted.org/packages/d0/44/681604464ed9541673e486521497406fadcc15b5217c3e326b061696899a/cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592", size = 221584, upload-time = "2025-09-08T23:23:36.096Z" }, + { url = "https://files.pythonhosted.org/packages/25/8e/342a504ff018a2825d395d44d63a767dd8ebc927ebda557fecdaca3ac33a/cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512", size = 224443, upload-time = "2025-09-08T23:23:37.328Z" }, + { url = "https://files.pythonhosted.org/packages/e1/5e/b666bacbbc60fbf415ba9988324a132c9a7a0448a9a8f125074671c0f2c3/cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4", size = 223437, upload-time = "2025-09-08T23:23:38.945Z" }, + { url = "https://files.pythonhosted.org/packages/a0/1d/ec1a60bd1a10daa292d3cd6bb0b359a81607154fb8165f3ec95fe003b85c/cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e", size = 180487, upload-time = "2025-09-08T23:23:40.423Z" }, + { url = "https://files.pythonhosted.org/packages/bf/41/4c1168c74fac325c0c8156f04b6749c8b6a8f405bbf91413ba088359f60d/cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6", size = 191726, upload-time = "2025-09-08T23:23:41.742Z" }, + { url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195, upload-time = "2025-09-08T23:23:43.004Z" }, +] + [[package]] name = "click" version = "8.3.2" @@ -85,6 +139,59 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] +[[package]] +name = "cryptography" +version = "48.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9f/a9/db8f313fdcd85d767d4973515e1db101f9c71f95fced83233de224673757/cryptography-48.0.0.tar.gz", hash = "sha256:5c3932f4436d1cccb036cb0eaef46e6e2db91035166f1ad6505c3c9d5a635920", size = 832984, upload-time = "2026-05-04T22:59:38.133Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/df/3d/01f6dd9190170a5a241e0e98c2d04be3664a9e6f5b9b872cde63aff1c3dd/cryptography-48.0.0-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:0c558d2cdffd8f4bbb30fc7134c74d2ca9a476f830bb053074498fbc86f41ed6", size = 8001587, upload-time = "2026-05-04T22:57:36.803Z" }, + { url = "https://files.pythonhosted.org/packages/b2/6e/e90527eef33f309beb811cf7c982c3aeffcce8e3edb178baa4ca3ae4a6fa/cryptography-48.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f5333311663ea94f75dd408665686aaf426563556bb5283554a3539177e03b8c", size = 4690433, upload-time = "2026-05-04T22:57:40.373Z" }, + { url = "https://files.pythonhosted.org/packages/90/04/673510ed51ddff56575f306cf1617d80411ee76831ccd3097599140efdfe/cryptography-48.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7995ef305d7165c3f11ae07f2517e5a4f1d5c18da1376a0a9ed496336b69e5f3", size = 4710620, upload-time = "2026-05-04T22:57:42.935Z" }, + { url = "https://files.pythonhosted.org/packages/14/d5/e9c4ef932c8d800490c34d8bd589d64a31d5890e27ec9e9ad532be893294/cryptography-48.0.0-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:40ba1f85eaa6959837b1d51c9767e230e14612eea4ef110ee8854ada22da1bf5", size = 4696283, upload-time = "2026-05-04T22:57:45.294Z" }, + { url = "https://files.pythonhosted.org/packages/0c/29/174b9dfb60b12d59ecfc6cfa04bc88c21b42a54f01b8aae09bb6e51e4c7f/cryptography-48.0.0-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:369a6348999f94bbd53435c894377b20ab95f25a9065c283570e70150d8abc3c", size = 5296573, upload-time = "2026-05-04T22:57:47.933Z" }, + { url = "https://files.pythonhosted.org/packages/95/38/0d29a6fd7d0d1373f0c0c88a04ba20e359b257753ac497564cd660fc1d55/cryptography-48.0.0-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a0e692c683f4df67815a2d258b324e66f4738bd7a96a218c826dce4f4bd05d8f", size = 4743677, upload-time = "2026-05-04T22:57:50.067Z" }, + { url = "https://files.pythonhosted.org/packages/30/be/eef653013d5c63b6a490529e0316f9ac14a37602965d4903efed1399f32b/cryptography-48.0.0-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:18349bbc56f4743c8b12dc32e2bccb2cf83ee8b69a3bba74ef8ae857e26b3d25", size = 4330808, upload-time = "2026-05-04T22:57:52.301Z" }, + { url = "https://files.pythonhosted.org/packages/84/9e/500463e87abb7a0a0f9f256ec21123ecde0a7b5541a15e840ea54551fd81/cryptography-48.0.0-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:7e8eac43dfca5c4cccc6dad9a80504436fca53bb9bc3100a2386d730fbe6b602", size = 4695941, upload-time = "2026-05-04T22:57:54.603Z" }, + { url = "https://files.pythonhosted.org/packages/e3/dc/7303087450c2ec9e7fbb750e17c2abfbc658f23cbd0e54009509b7cc4091/cryptography-48.0.0-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:9ccdac7d40688ecb5a3b4a604b8a88c8002e3442d6c60aead1db2a89a041560c", size = 5252579, upload-time = "2026-05-04T22:57:57.207Z" }, + { url = "https://files.pythonhosted.org/packages/d0/c0/7101d3b7215edcdc90c45da544961fd8ed2d6448f77577460fa75a8443f7/cryptography-48.0.0-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:bd72e68b06bb1e96913f97dd4901119bc17f39d4586a5adf2d3e47bc2b9d58b5", size = 4743326, upload-time = "2026-05-04T22:57:59.535Z" }, + { url = "https://files.pythonhosted.org/packages/ac/d8/5b833bad13016f562ab9d063d68199a4bd121d18458e439515601d3357ec/cryptography-48.0.0-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:59baa2cb386c4f0b9905bd6eb4c2a79a69a128408fd31d32ca4d7102d4156321", size = 4826672, upload-time = "2026-05-04T22:58:01.996Z" }, + { url = "https://files.pythonhosted.org/packages/98/e1/7074eb8bf3c135558c73fc2bcf0f5633f912e6fb87e868a55c454080ef09/cryptography-48.0.0-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9249e3cd978541d665967ac2cb2787fd6a62bddf1e75b3e347a594d7dacf4f74", size = 4972574, upload-time = "2026-05-04T22:58:03.968Z" }, + { url = "https://files.pythonhosted.org/packages/04/70/e5a1b41d325f797f39427aa44ef8baf0be500065ab6d8e10369d850d4a4f/cryptography-48.0.0-cp311-abi3-win32.whl", hash = "sha256:9c459db21422be75e2809370b829a87eb37f74cd785fc4aa9ea1e5f43b47cda4", size = 3294868, upload-time = "2026-05-04T22:58:06.467Z" }, + { url = "https://files.pythonhosted.org/packages/f4/ac/8ac51b4a5fc5932eb7ee5c517ba7dc8cd834f0048962b6b352f00f41ebf9/cryptography-48.0.0-cp311-abi3-win_amd64.whl", hash = "sha256:5b012212e08b8dd5edc78ef54da83dd9892fd9105323b3993eff6bea65dc21d7", size = 3817107, upload-time = "2026-05-04T22:58:08.845Z" }, + { url = "https://files.pythonhosted.org/packages/6b/84/70e3feea9feea87fd7cbe77efb2712ae1e3e6edf10749dc6e95f4e60e455/cryptography-48.0.0-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:3cb07a3ed6431663cd321ea8a000a1314c74211f823e4177fefa2255e057d1ec", size = 7986556, upload-time = "2026-05-04T22:58:11.172Z" }, + { url = "https://files.pythonhosted.org/packages/89/6e/18e07a618bb5442ba10cf4df16e99c071365528aa570dfcb8c02e25a303b/cryptography-48.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8c7378637d7d88016fa6791c159f698b3d3eed28ebf844ac36b9dc04a14dae18", size = 4684776, upload-time = "2026-05-04T22:58:13.712Z" }, + { url = "https://files.pythonhosted.org/packages/be/6a/4ea3b4c6c6759794d5ee2103c304a5076dc4b19ae1f9fe47dba439e159e9/cryptography-48.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:cc90c0b39b2e3c65ef52c804b72e3c58f8a04ab2a1871272798e5f9572c17d20", size = 4698121, upload-time = "2026-05-04T22:58:16.448Z" }, + { url = "https://files.pythonhosted.org/packages/2f/59/6ff6ad6cae03bb887da2a5860b2c9805f8dac969ef01ce563336c49bd1d1/cryptography-48.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:76341972e1eff8b4bea859f09c0d3e64b96ce931b084f9b9b7db8ef364c30eff", size = 4690042, upload-time = "2026-05-04T22:58:18.544Z" }, + { url = "https://files.pythonhosted.org/packages/ca/b4/fc334ed8cfd705aca282fe4d8f5ae64a8e0f74932e9feecb344610cf6e4d/cryptography-48.0.0-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:55b7718303bf06a5753dcdccf2f3945cf18ad7bffde41b61226e4db31ab89a9c", size = 5282526, upload-time = "2026-05-04T22:58:20.75Z" }, + { url = "https://files.pythonhosted.org/packages/11/08/9f8c5386cc4cd90d8255c7cdd0f5baf459a08502a09de30dc51f553d38dc/cryptography-48.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:a64697c641c7b1b2178e573cbc31c7c6684cd56883a478d75143dbb7118036db", size = 4733116, upload-time = "2026-05-04T22:58:23.627Z" }, + { url = "https://files.pythonhosted.org/packages/b8/77/99307d7574045699f8805aa500fa0fb83422d115b5400a064ddd306d7750/cryptography-48.0.0-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:561215ea3879cb1cbbf272867e2efda62476f240fb58c64de6b393ae19246741", size = 4316030, upload-time = "2026-05-04T22:58:25.581Z" }, + { url = "https://files.pythonhosted.org/packages/fd/36/a608b98337af3cb2aff4818e406649d30572b7031918b04c87d979495348/cryptography-48.0.0-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:ad64688338ed4bc1a6618076ba75fd7194a5f1797ac60b47afe926285adb3166", size = 4689640, upload-time = "2026-05-04T22:58:27.747Z" }, + { url = "https://files.pythonhosted.org/packages/dd/a6/825010a291b4438aecc1f568bc428189fc1175515223632477c07dc0a6df/cryptography-48.0.0-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:906cbf0670286c6e0044156bc7d4af9cbb0ef6db9f73e52c3ec56ba6bdde5336", size = 5237657, upload-time = "2026-05-04T22:58:29.848Z" }, + { url = "https://files.pythonhosted.org/packages/b9/09/4e76a09b4caa29aad535ddc806f5d4c5d01885bd978bd984fbc6ca032cae/cryptography-48.0.0-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:ea8990436d914540a40ab24b6a77c0969695ed52f4a4874c5137ccf7045a7057", size = 4732362, upload-time = "2026-05-04T22:58:32.009Z" }, + { url = "https://files.pythonhosted.org/packages/18/78/444fa04a77d0cb95f417dda20d450e13c56ba8e5220fc892a1658f44f882/cryptography-48.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c18684a7f0cc9a3cb60328f496b8e3372def7c5d2df39ac267878b05565aaaae", size = 4819580, upload-time = "2026-05-04T22:58:34.254Z" }, + { url = "https://files.pythonhosted.org/packages/38/85/ea67067c70a1fd4be2c63d35eeed82658023021affccc7b17705f8527dd2/cryptography-48.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:9be5aafa5736574f8f15f262adc81b2a9869e2cfe9014d52a44633905b40d52c", size = 4963283, upload-time = "2026-05-04T22:58:36.376Z" }, + { url = "https://files.pythonhosted.org/packages/75/54/cc6d0f3deac3e81c7f847e8a189a12b6cdd65059b43dad25d4316abd849a/cryptography-48.0.0-cp314-cp314t-win32.whl", hash = "sha256:c17dfe85494deaeddc5ce251aebd1d60bbe6afc8b62071bb0b469431a000124f", size = 3270954, upload-time = "2026-05-04T22:58:38.791Z" }, + { url = "https://files.pythonhosted.org/packages/49/67/cc947e288c0758a4e5473d1dcb743037ab7785541265a969240b8885441a/cryptography-48.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:27241b1dc9962e056062a8eef1991d02c3a24569c95975bd2322a8a52c6e5e12", size = 3797313, upload-time = "2026-05-04T22:58:40.746Z" }, + { url = "https://files.pythonhosted.org/packages/f2/63/61d4a4e1c6b6bab6ce1e213cd36a24c415d90e76d78c5eb8577c5541d2e8/cryptography-48.0.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:58d00498e8933e4a194f3076aee1b4a97dfec1a6da444535755822fe5d8b0b86", size = 7983482, upload-time = "2026-05-04T22:58:43.769Z" }, + { url = "https://files.pythonhosted.org/packages/d5/ac/f5b5995b87770c693e2596559ffafe195b4033a57f14a82268a2842953f3/cryptography-48.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:614d0949f4790582d2cc25553abd09dd723025f0c0e7c67376a1d77196743d6e", size = 4683266, upload-time = "2026-05-04T22:58:46.064Z" }, + { url = "https://files.pythonhosted.org/packages/ec/c6/8b14f67e18338fbc4adb76f66c001f5c3610b3e2d1837f268f47a347dbbb/cryptography-48.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7ce4bfae76319a532a2dc68f82cc32f5676ee792a983187dac07183690e5c66f", size = 4696228, upload-time = "2026-05-04T22:58:48.22Z" }, + { url = "https://files.pythonhosted.org/packages/ea/73/f808fbae9514bd91b47875b003f13e284c8c6bdfd904b7944e803937eec1/cryptography-48.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:2eb992bbd4661238c5a397594c83f5b4dc2bc5b848c365c8f991b6780efcc5c7", size = 4689097, upload-time = "2026-05-04T22:58:50.9Z" }, + { url = "https://files.pythonhosted.org/packages/93/01/d86632d7d28db8ae83221995752eeb6639ffb374c2d22955648cf8d52797/cryptography-48.0.0-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:22a5cb272895dce158b2cacdfdc3debd299019659f42947dbdac6f32d68fe832", size = 5283582, upload-time = "2026-05-04T22:58:53.017Z" }, + { url = "https://files.pythonhosted.org/packages/02/e1/50edc7a50334807cc4791fc4a0ce7468b4a1416d9138eab358bfc9a3d70b/cryptography-48.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:2b4d59804e8408e2fea7d1fbaf218e5ec984325221db76e6a241a9abd6cdd95c", size = 4730479, upload-time = "2026-05-04T22:58:55.611Z" }, + { url = "https://files.pythonhosted.org/packages/6f/af/99a582b1b1641ff5911ac559beb45097cf79efd4ead4657f578ef1af2d47/cryptography-48.0.0-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:984a20b0f62a26f48a3396c72e4bc34c66e356d356bf370053066b3b6d54634a", size = 4326481, upload-time = "2026-05-04T22:58:57.607Z" }, + { url = "https://files.pythonhosted.org/packages/90/ee/89aa26a06ef0a7d7611788ffd571a7c50e368cc6a4d5eef8b4884e866edb/cryptography-48.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:5a5ed8fde7a1d09376ca0b40e68cd59c69fe23b1f9768bd5824f54681626032a", size = 4688713, upload-time = "2026-05-04T22:59:00.077Z" }, + { url = "https://files.pythonhosted.org/packages/70/ba/bcb1b0bb7a33d4c7c0c4d4c7874b4a62ae4f56113a5f4baefa362dfb1f0f/cryptography-48.0.0-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:8cd666227ef7af430aa5914a9910e0ddd703e75f039cef0825cd0da71b6b711a", size = 5238165, upload-time = "2026-05-04T22:59:02.317Z" }, + { url = "https://files.pythonhosted.org/packages/c9/70/ca4003b1ce5ca3dc3186ada51908c8a9b9ff7d5cab83cc0d43ee14ec144f/cryptography-48.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9071196d81abc88b3516ac8cdfad32e2b66dd4a5393a8e68a961e9161ddc6239", size = 4729947, upload-time = "2026-05-04T22:59:05.255Z" }, + { url = "https://files.pythonhosted.org/packages/44/a0/4ec7cf774207905aef1a8d11c3750d5a1db805eb380ee4e16df317870128/cryptography-48.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1e2d54c8be6152856a36f0882ab231e70f8ec7f14e93cf87db8a2ed056bf160c", size = 4822059, upload-time = "2026-05-04T22:59:07.802Z" }, + { url = "https://files.pythonhosted.org/packages/1e/75/a2e55f99c16fcac7b5d6c1eb19ad8e00799854d6be5ca845f9259eae1681/cryptography-48.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a5da777e32ffed6f85a7b2b3f7c5cbc88c146bfcd0a1d7baf5fcc6c52ee35dd4", size = 4960575, upload-time = "2026-05-04T22:59:09.851Z" }, + { url = "https://files.pythonhosted.org/packages/b8/23/6e6f32143ab5d8b36ca848a502c4bcd477ae75b9e1677e3530d669062578/cryptography-48.0.0-cp39-abi3-win32.whl", hash = "sha256:77a2ccbbe917f6710e05ba9adaa25fb5075620bf3ea6fb751997875aff4ae4bd", size = 3279117, upload-time = "2026-05-04T22:59:12.019Z" }, + { url = "https://files.pythonhosted.org/packages/9d/9a/0fea98a70cf1749d41d738836f6349d97945f7c89433a259a6c2642eefeb/cryptography-48.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:16cd65b9330583e4619939b3a3843eec1e6e789744bb01e7c7e2e62e33c239c8", size = 3792100, upload-time = "2026-05-04T22:59:14.884Z" }, +] + [[package]] name = "dnspython" version = "2.8.0" @@ -169,6 +276,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, ] +[[package]] +name = "httpcore" +version = "1.0.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "h11" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" }, +] + [[package]] name = "httptools" version = "0.7.1" @@ -191,6 +311,21 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/53/cf/878f3b91e4e6e011eff6d1fa9ca39f7eb17d19c9d7971b04873734112f30/httptools-0.7.1-cp314-cp314-win_amd64.whl", hash = "sha256:cfabda2a5bb85aa2a904ce06d974a3f30fb36cc63d7feaddec05d2050acede96", size = 88205, upload-time = "2025-10-10T03:55:00.389Z" }, ] +[[package]] +name = "httpx" +version = "0.28.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "certifi" }, + { name = "httpcore" }, + { name = "idna" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, +] + [[package]] name = "idna" version = "3.11" @@ -206,7 +341,9 @@ version = "0.1.0" source = { virtual = "." } dependencies = [ { name = "asyncpg" }, + { name = "cryptography" }, { name = "fastapi" }, + { name = "httpx" }, { name = "pydantic", extra = ["email"] }, { name = "pydantic-settings" }, { name = "sqlalchemy", extra = ["asyncio"] }, @@ -214,20 +351,35 @@ dependencies = [ [package.dev-dependencies] dev = [ + { name = "ruff" }, { name = "uvicorn", extra = ["standard"] }, ] [package.metadata] requires-dist = [ { name = "asyncpg", specifier = ">=0.31.0" }, + { name = "cryptography", specifier = ">=46.0.0" }, { name = "fastapi", specifier = ">=0.136.0" }, + { name = "httpx", specifier = ">=0.28.1" }, { name = "pydantic", extras = ["email"], specifier = ">=2.13.2" }, { name = "pydantic-settings", specifier = ">=2.13.1" }, { name = "sqlalchemy", extras = ["asyncio"], specifier = ">=2.0.49" }, ] [package.metadata.requires-dev] -dev = [{ name = "uvicorn", extras = ["standard"], specifier = ">=0.44.0" }] +dev = [ + { name = "ruff", specifier = ">=0.11.0" }, + { name = "uvicorn", extras = ["standard"], specifier = ">=0.44.0" }, +] + +[[package]] +name = "pycparser" +version = "3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1b/7d/92392ff7815c21062bea51aa7b87d45576f649f16458d78b7cf94b9ab2e6/pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29", size = 103492, upload-time = "2026-01-21T14:26:51.89Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992", size = 48172, upload-time = "2026-01-21T14:26:50.693Z" }, +] [[package]] name = "pydantic" @@ -364,6 +516,31 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, ] +[[package]] +name = "ruff" +version = "0.15.13" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/24/21/a7d5c126d5b557715ef81098f3db2fe20f622a039ff2e626af28d674ab80/ruff-0.15.13.tar.gz", hash = "sha256:f9d89f17f7ba7fb2ed42921f0df75da797a9a5d71bc39049e2c687cf2baf44b7", size = 4678180, upload-time = "2026-05-14T13:44:37.869Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c6/61/11d458dc6ac22504fd8e237b29dfd40504c7fbbcc8930402cfe51a8e63ed/ruff-0.15.13-py3-none-linux_armv6l.whl", hash = "sha256:444b580fc72fd6887e650acd3e575e18cdc79dbcf42fb4030b491057921f61f8", size = 10738279, upload-time = "2026-05-14T13:44:18.7Z" }, + { url = "https://files.pythonhosted.org/packages/86/ca/caa871ee7be718c45256fada4e16a218ee3e33f0c4a46b729a60a24912e6/ruff-0.15.13-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6590d009e7cb7ebf36f83dbdd44a3fa48a0994ff6f1cdc1b08006abe58f98dc7", size = 11124798, upload-time = "2026-05-14T13:44:06.427Z" }, + { url = "https://files.pythonhosted.org/packages/d3/19/43f5f2e568dddde567fc41f8471f9432c09563e19d3e617a48cfa52f8f0a/ruff-0.15.13-py3-none-macosx_11_0_arm64.whl", hash = "sha256:1c26d2f66163deeb6e08d8b39fbbe983ce3c71cea06a6d7591cfd1421793c629", size = 10460761, upload-time = "2026-05-14T13:44:04.375Z" }, + { url = "https://files.pythonhosted.org/packages/99/df/cf938cd6de3003178f03ad7c1ea2a6c099468c03a35037985070b37e76be/ruff-0.15.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dbd6f94b434f896308e4d57fb7bfde0d02b99f7a64b3bdab0fdfa6a864203a5", size = 10804451, upload-time = "2026-05-14T13:44:25.221Z" }, + { url = "https://files.pythonhosted.org/packages/c7/7d/5d0973129b154ded2225729169d7068f26b467760b146493fde138415f23/ruff-0.15.13-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bf3259f3be4d181bda591da5db2571aed6853c6a048157756448020bc6c5cd22", size = 10534285, upload-time = "2026-05-14T13:44:08.888Z" }, + { url = "https://files.pythonhosted.org/packages/1f/e3/6b999bbc66cd51e5f073842bc2a3995e99c5e0e72e16b15e7261f7abf57a/ruff-0.15.13-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae9c17e5eb4430c154e76abc25d79a318190f5a997f38fb6b114416c5319ffc9", size = 11312063, upload-time = "2026-05-14T13:44:11.274Z" }, + { url = "https://files.pythonhosted.org/packages/af/5a/642639e9f5db04f1e97fbd6e091c6fd20725bdf072fb114d00eefb9e6eb8/ruff-0.15.13-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e2e39bff6c341f4b577a21b801326fab0b11847f48fcaa83f00a113c9b3cb55", size = 12183079, upload-time = "2026-05-14T13:44:01.634Z" }, + { url = "https://files.pythonhosted.org/packages/19/4c/7585735f6b53b0f12de13618b2f7d250a844f018822efc899df2e7b8295f/ruff-0.15.13-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e8d9a8e08013542e94d3220bc5b62cc3e5ef87c5f74bff367d3fac14fab013e6", size = 11440833, upload-time = "2026-05-14T13:43:59.043Z" }, + { url = "https://files.pythonhosted.org/packages/e8/31/bf1a0803d077e679cfeee5f2f67290a0fa79c7385b5d9a8c17b9db2c48f0/ruff-0.15.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc411dfebe5eebe55ce041c6ae080eb7668955e866daa2fbb16692a784f1c4ca", size = 11434486, upload-time = "2026-05-14T13:44:27.761Z" }, + { url = "https://files.pythonhosted.org/packages/e1/4e/62c9b999875d4f14db80f277c030578f5e249c9852d65b7ac7ad0b43c041/ruff-0.15.13-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:768494eb08b9cee54e2fd27969966f74db5a57f6eaa7a90fcb3306af34dfc4bd", size = 11385189, upload-time = "2026-05-14T13:44:13.704Z" }, + { url = "https://files.pythonhosted.org/packages/fc/89/7e959047a104df3eb12863447c110140191fc5b6c4f379ea2e803fcdb0e4/ruff-0.15.13-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:fb75f9a3a7e42ffe117d734494e6c5e5cb3565d66e12612cb63d0e572a41a5b6", size = 10781380, upload-time = "2026-05-14T13:43:56.734Z" }, + { url = "https://files.pythonhosted.org/packages/ff/52/5fd18f3b88cab63e88aa11516b3b4e1e5f720e5c330f8dbe5c26210f41f8/ruff-0.15.13-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8cb74dd33bb2f6613faf7fc03b660053b5ac4f80e706d5788c6335e2a8048d51", size = 10540605, upload-time = "2026-05-14T13:44:20.748Z" }, + { url = "https://files.pythonhosted.org/packages/e8/e0/9e35f338990d3e41a82875ff7053ffe97541dae81c9d02143177f381d572/ruff-0.15.13-py3-none-musllinux_1_2_i686.whl", hash = "sha256:7ef823f817fcd191dc934e984be9cf4094f808effa16f2542ad8e821ba02bbf2", size = 11036554, upload-time = "2026-05-14T13:44:16.256Z" }, + { url = "https://files.pythonhosted.org/packages/c2/13/070fb048c24080fba188f66371e2a92785be257ad02242066dc7255ac6e9/ruff-0.15.13-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:f345a13937bd7f09f6f5d19fa0721b0c103e00e7f62bc67089a8e5e037719e0b", size = 11528133, upload-time = "2026-05-14T13:44:22.808Z" }, + { url = "https://files.pythonhosted.org/packages/6b/8c/b1e1666aef7fc6555094d73ae6cd981701781ae85b97ceefc0eebd0b4668/ruff-0.15.13-py3-none-win32.whl", hash = "sha256:4044f94208b3b05ba0fc4a4abd0558cf4d6459bd18325eead7fd8cc66f909b41", size = 10721455, upload-time = "2026-05-14T13:44:35.697Z" }, + { url = "https://files.pythonhosted.org/packages/ab/a6/870a3e8a50590bb92be184ad928c2922f088b00d9dc5c5ec7b924ee08c22/ruff-0.15.13-py3-none-win_amd64.whl", hash = "sha256:7064884d442b7d477b4e7473d12da7f08851d2b1982763c5d3f388a19468a1a4", size = 11900409, upload-time = "2026-05-14T13:44:30.389Z" }, + { url = "https://files.pythonhosted.org/packages/9b/36/9c015cd052fca743dae8cb2aeb16b551444787467db42ceab0fc968865af/ruff-0.15.13-py3-none-win_arm64.whl", hash = "sha256:2471da9bd1068c8c064b5fd9c0c4b6dddffd6369cb1cd68b29993b1709ff1b21", size = 11179336, upload-time = "2026-05-14T13:44:33.026Z" }, +] + [[package]] name = "sqlalchemy" version = "2.0.49"