Skip to content

Comments

Make FastAPI Optional#15

Merged
JeanMainguy merged 3 commits intomainfrom
make_fastapi_optional
Feb 5, 2026
Merged

Make FastAPI Optional#15
JeanMainguy merged 3 commits intomainfrom
make_fastapi_optional

Conversation

@JeanMainguy
Copy link
Member

@JeanMainguy JeanMainguy commented Feb 5, 2026

Make FastAPI Optional

This PR separates FastAPI dependencies from the core package, allowing users to install just the database models and CLI tools without the API server.

Changes:

  • Moved fastapi from core to optional dependencies (pip install .[fastapi])
  • Replaced fastapi.Query with pydantic.Field in filter models
  • Moved SettingsDep from config.py to dependencies.py
  • Added import guards in main.py and dependencies.py with helpful error messages
  • Updated README with two installation options

Installation:

  • Core package only (models, DB, CLI): pip install .
  • With API server: pip install .[fastapi]

This allows users to depend on PanGBank models and utilities in their projects without requiring the full FastAPI stack.

@JeanMainguy JeanMainguy changed the title Make fastapi optional Make FastAPI Optional Feb 5, 2026
@JeanMainguy JeanMainguy force-pushed the make_fastapi_optional branch from 0ff5fcb to b40deaa Compare February 5, 2026 14:58
@JeanMainguy JeanMainguy merged commit 6bb2d91 into main Feb 5, 2026
3 checks passed
@JeanMainguy JeanMainguy deleted the make_fastapi_optional branch February 5, 2026 15:07
@JeanMainguy JeanMainguy restored the make_fastapi_optional branch February 5, 2026 15:07
@JeanMainguy JeanMainguy deleted the make_fastapi_optional branch February 17, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant