Skip to main content
jeroboam-logo

Flask-Jeroboam

English | Français

Use FastAPI's elegant parameter syntax in your Flask applications.

PyPI Python Version Download License Commit

Read the documentation at https://flask-jeroboam.readthedocs.io/ Coverage Tests pre-commit Ruff OpenSSF Scorecard


Documentation: https://flask-jeroboam.readthedocs.io/

Source Code: https://github.com/jcbianic/flask-jeroboam


What is Flask-Jeroboam?

Flask-Jeroboam brings FastAPI's approach to Flask. If you like how FastAPI handles request parsing, response validation, and automatic docs—but you need Flask instead—this is for you.

It inspects your endpoint function signatures and handles validation, serialization, and OpenAPI docs automatically. It's just a thin layer connecting Flask to Pydantic the way FastAPI does.

Why Flask-Jeroboam?

You have existing Flask code — Refactoring to FastAPI isn't an option. Jeroboam is a drop-in extension.

You rely on Flask's ecosystem — Flask-SQLAlchemy, Flask-Login, Flask-Admin, and dozens of other extensions just work. FastAPI doesn't integrate with them.

You serve both HTML and APIs — Some apps need to render templates alongside JSON endpoints. Flask handles both naturally.

You prefer WSGI — Whether for infrastructure reasons or team preference, WSGI is your deployment model.

You want FastAPI's development experience — Type-safe endpoints with automatic documentation, without switching frameworks.

Key Features

  • Per-Parameter Validation — Type hints on endpoint arguments automatically validate and parse request data
  • Response Validation — Define response models; Jeroboam validates outgoing data matches the schema
  • Automatic OpenAPI Docs — Interactive API documentation generated automatically
  • Type Safety — Use Python type hints to make code clearer and catch bugs earlier
  • Drop-In Compatible — Works with existing Flask applications and extensions

Quick Install

$ pip install flask-jeroboam

Full setup guide with dependency management: Installation

A Taste

from flask_jeroboam import Jeroboam, InboundModel, OutboundModel
from typing import Optional

app = Jeroboam(__name__)

class WineQuery(InboundModel):
    page: int = 1
    search: Optional[str] = None

class WineOut(OutboundModel):
    name: str
    appellation: str

@app.get("/wines", response_model=list[WineOut])
def list_wines(query: WineQuery):
    return get_wines(query.page, query.search)

Query params are parsed and validated from the type hints. The response is filtered and serialized against WineOut. Hit /docs for the interactive OpenAPI interface.

Next Steps

New to Jeroboam? Start with the Getting Started guide.

Ready to build? Follow the Tutorial for a complete example.

Need specifics? Check the How-to Guides for common tasks.

Want deeper understanding? Read the Concepts section.

How Does It Compare?

Flask-Jeroboam sits at a specific point in the landscape—closer to FastAPI than to flask-openapi3 or flask-restx, but firmly in the Flask ecosystem.

Aspect Jeroboam flask-openapi3 FastAPI
Per-parameter hints ✅ ❌ (groups in models) ✅
Response validation ✅ by default ⚠️ opt-in ✅ by default
Pydantic v2 ✅ ✅ ✅
Decorator composition ✅ ❌ ✅
Flask compatible ✅ ✅ ❌ (separate framework)
Async/await ❌ (WSGI) ❌ (WSGI) ✅ (ASGI)

See the full Comparison Guide for in-depth analysis.

About the Name

A Jeroboam is a large wine bottle (5 litres in Bordeaux, 3 litres elsewhere) designed for fine wines that age well. The larger surface-area-to-volume ratio slows oxidation. Temperature stays more stable. They're built to last without degrading your wine.

The project aims for the same durability: an API that stays solid and reliable as it ages.

License

Distributed under the MIT License. Flask-Jeroboam is free and open source.

Issues

Found a bug or want to suggest a feature? Please file an issue using the available templates.

Credits

Inspired by @tiangolo's FastAPI.

Built on Flask and Pydantic—both excellent projects.

Metadata

Release files for flask-jeroboam 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-jeroboam 0.2.2
File Size Uploaded
flask_jeroboam-0.2.2.tar.gz 390.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-jeroboam 0.2.2
File Interpreter ABI Platform
flask_jeroboam-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 434.0 kB

Release files / flask_jeroboam-0.2.2.tar.gz

Download URL flask_jeroboam-0.2.2.tar.gz
Size 390.5 kB
Tags Source
SHA-256 checksum
How to use checksums
444cd25219267b13ecfc9f952f6ef385d8b518ec90a5d890ca4b8797a6ebe0fd
BLAKE2b-256 checksum
How to use checksums
22950badf942ef40290dd90505a32fb409a6dd1a45813a47802fd51d4dfb4735
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / flask_jeroboam-0.2.2-py3-none-any.whl

Download URL flask_jeroboam-0.2.2-py3-none-any.whl
Size 43.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1726dd11edd100363f90ef620df66646a382220c81cde0c194f789b8cd7e01ad
BLAKE2b-256 checksum
How to use checksums
fc2bd08bd68af8314e3b7ebe12edb80acb909819f8c581263ffd917172b69f1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page