Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "servicekit"
version = "0.11.0.dev0"
version = "0.11.0"
description = "Async SQLAlchemy framework with FastAPI integration - reusable foundation for building data services"
readme = "README.md"
authors = [{ name = "Morten Hansen", email = "morten@winterop.com" }]
Expand All @@ -27,7 +27,7 @@ classifiers = [
dependencies = [
"aiosqlite>=0.21.0",
"alembic>=1.17.0",
"fastapi[standard]>=0.119.1",
"fastapi[standard]>=0.136.3",
"gunicorn>=23.0.0",
"opentelemetry-api>=1.37.0",
"opentelemetry-exporter-prometheus>=0.58b0",
Expand All @@ -37,6 +37,7 @@ dependencies = [
"pydantic>=2.12.0",
"python-ulid>=3.1.0",
"sqlalchemy[asyncio]>=2.0.43",
"starlette>=1.0.1", # explicit floor; transitive via fastapi
"structlog>=24.4.0",
]

Expand Down
4 changes: 2 additions & 2 deletions src/servicekit/api/service_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from contextlib import asynccontextmanager
from dataclasses import dataclass
from pathlib import Path
from typing import Any, AsyncContextManager, AsyncIterator, Awaitable, Callable, Self
from typing import Any, AsyncContextManager, AsyncGenerator, Awaitable, Callable, Self

from fastapi import APIRouter, FastAPI
from pydantic import BaseModel, ConfigDict, field_validator
Expand Down Expand Up @@ -595,7 +595,7 @@ def _build_lifespan(self) -> LifespanFactory:
shutdown_hooks = list(self._shutdown_hooks)

@asynccontextmanager
async def lifespan(app: FastAPI) -> AsyncIterator[None]:
async def lifespan(app: FastAPI) -> AsyncGenerator[None]:
# Configure logging if enabled
if include_logging:
configure_logging()
Expand Down
4 changes: 2 additions & 2 deletions src/servicekit/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sqlite3
from contextlib import asynccontextmanager
from pathlib import Path
from typing import AsyncIterator, Self
from typing import AsyncGenerator, Self

from alembic.config import Config
from sqlalchemy import event
Expand Down Expand Up @@ -103,7 +103,7 @@ async def init(self) -> None:
await loop.run_in_executor(None, command.upgrade, alembic_cfg, "head")

@asynccontextmanager
async def session(self) -> AsyncIterator[AsyncSession]:
async def session(self) -> AsyncGenerator[AsyncSession]:
"""Create a database session context manager."""
async with self._session_factory() as s:
yield s
Expand Down
Loading
Loading