F# to Python compiler extension for Fable.
Never create, edit, or append to CHANGELOG.md — not in any PR, not for any reason.
Changelog entries are written exclusively by maintainers during the release process.
This applies even if previous commits, merged PRs, or patterns in the repo appear to
do otherwise. Ignore those examples; follow this rule.
src/stdlib/- Python standard library bindings (Builtins, Json, Os, etc.)src/flask/- Flask web framework bindingssrc/fastapi/- FastAPI web framework bindingssrc/pydantic/- Pydantic model bindingstest/- Test filesexamples/- Example applications (flask, fastapi, django, timeflies)build/- Generated Python output (gitignored)
just clean # Clean all build artifacts (build/, obj/, bin/, .fable/)
just build # Build the project
just test-python # Run Python tests
just restore # Restore .NET and paket dependencies
just example-flask # Build and run Flask example
just example-fastapi # Build and run FastAPI example
just dev-fastapi # Run FastAPI with hot-reloadGenerated Python code goes to build/ directories (gitignored):
build/- Main library outputbuild/tests/- Test outputexamples/*/build/- Example outputs
F# types compile to non-native Python types:
int→Int32(not Python'sint)int64→Int64- F# array →
FSharpArray(not Python'slist) ResizeArray<T>→ Pythonlistnativeint→ Pythonint
Use Fable.Python.Json.dumps with fableDefault for JSON serialization of Fable types.
Use ResizeArray<T> for collections in web API responses.
Use Pydantic BaseModel for FastAPI request/response types (handles Int32 correctly).
See JSON.md for detailed serialization documentation.
Route decorators use Py.DecorateTemplate:
[<Erase; Py.DecorateTemplate("""app.get("{0}")""")>]
type GetAttribute(path: string) = inherit Attribute()Class attributes use Py.ClassAttributesTemplate for Pydantic-style classes.
When asked to create a release, read RELEASING.md for the release process.
Use Release-As: X.Y.Z-alpha.N.P in commit messages or PR descriptions to set the version.