fable-compiler/Fable.Python
73.0
Strong · 2 October 2026
5.2k
lines of production code
F#
primary language
2
measurements over time
What this system is
This system is a toolchain that compiles F\# code into Python, enabling developers to write Python applications using F\# syntax and tooling. It provides type-safe bindings for major Python web frameworks like Flask, FastAPI, and Django, as well as extensive coverage of the Python standard library and asynchronous primitives. The project includes comprehensive examples and testing utilities to demonstrate how F\# code integrates with the Python ecosystem.
How it got here
2021 — Library expansion and project scaffolding
14 changes.
The project underwent significant structural improvements, introducing a new build system with \justfile\ and migrating Python dependency management to \uv\. This period focused on expanding the Fable.Python library with comprehensive bindings for the standard library, Flask, Django, and Jupyter, alongside the addition of corresponding example applications and test suites.
2024–2025 — FastAPI and Pydantic integration
5 changes.
This period focused on expanding Fable.Python's web development capabilities by introducing first-class bindings for FastAPI and Pydantic. The work included implementing core F\# wrappers for these Python libraries, creating comprehensive examples for building REST APIs, and adding testing utilities to support the new integration.
Features
Add F\# bindings for IPython display and ipywidgets
New F\# modules (IPython.fs and IPyWidgets.fs) provide type-safe bindings to the Python IPython display API and ipywidgets library. Users can now call display functions (Code, Markdown) and create interactive widgets (IntSlider, FloatSlider) directly from F\# code within Jupyter notebooks.
src/jupyter · high confidence
Add F\# bindings for Python asyncio primitives and async context managers
This change introduces new F\# type bindings for the Python \asyncio\ module, enabling F\# code to interact with Python's asynchronous runtime. It adds support for \Future\ and \Task\ objects, allowing Python tasks to be translated to .NET \System.Threading.Tasks.Task\ instances via \create\_task\, and provides utilities like \sleep\ and event loop access (\get\_running\loop\). Crucially, it implements the \async with\ protocol through the \IAsyncContextManager\ interface and helper functions \using\ and \tryUsing\, allowing F\# developers to safely manage Python asynchronous context managers (objects implementing \\\aenter\\\/\\\aexit\\_\) within F\# async workflows.
src/stdlib/asyncio · high confidence
Add Flask example model with Bulma CSS integration
The Flask example now includes a Model definition that integrates the Bulma CSS framework (version 0.9.3) via the Zanaptak.TypedCssClasses library. This model defines the structure for application data, including fields for Author, Banner, Title, Description, PermaLink, and Brand, enabling the example to utilize Bulma's styling capabilities.
Flask · high confidence
Added Django project example
A new example demonstrating how to use Fable Python with Django has been added to the \examples/django\ directory. This includes compiled F\# source files for Django's standard project structure (Settings, URLs, WSGI, ASGI, and Manage scripts), allowing users to generate and run a Django project using the Fable Python toolchain.
examples/django · high confidence
Added F\# script to compile and run a Python Flask example
The \examples/scripts\ directory now includes a F\# script (\run\_flask\_app.fsx\) and a sample F\# source file (\flask\_sample.fsx\) that demonstrates how to use Fable.Python to compile F\# code into a Python Flask application. The script automates the workflow by restoring .NET tools, compiling the F\# script to Python using Fable, installing dependencies via pip (supporting both manual \requirements.txt\ and inferred requirements), and running the resulting Flask app in an isolated environment using \pip-run\.
examples/scripts · high confidence
Added Timeflies example using Fable.Python and AsyncRx
A new interactive demo named 'Timeflies' has been added to the examples directory. It demonstrates Fable.Python integration with Tkinter and FSharp.Control.AsyncRx, featuring a visual effect where text characters follow mouse movements. The example includes a .gitignore file, a README with build and run instructions, and references to the necessary NuGet packages (FSharp.Control.AsyncRx).
examples/timeflies · high confidence
Added minimal Django example using Fable.Python bindings
A new minimal example has been added to the examples/django-minimal directory, demonstrating how to use Fable.Python to interact with Django. The example includes a F\# source file (Program.fs) that sets up Django settings, defines a simple view, and configures URL routing using Fable.Python interop bindings. It also includes a README with instructions for installing dependencies, building the project, and running the Django development server, along with a .gitignore file to exclude Python bytecode files.
examples/django-minimal · high confidence
New F\# bindings for Pydantic and FastAPI
Added F\# bindings for the Python Pydantic and FastAPI libraries, enabling F\# developers to define data models with validation and build web APIs using class-based decorators. The \src/pydantic\ module provides \BaseModel\ and field configuration helpers, while \src/fastapi\ exposes route decorators (GET, POST, etc.), router support, and response types, allowing F\# code to compile to Python scripts that interact with these frameworks.
src/fastapi, src/pydantic · high confidence
New Fable.Python.Testing and Fable.Python.Fable.Types modules
Added two new modules to the Fable Python integration: Fable.Python.Testing provides pytest-compatible test utilities (including equality assertions and exception checking helpers like throwsError and throwsAnyError), and Fable.Python.Fable.Types offers runtime type detection helpers to distinguish F\# types (such as Int64, FSharpArray) from native Python types.
src/fable · high confidence
New FastAPI example with F\#-defined Pydantic models
Added an example in examples/fastapi demonstrating how to build a FastAPI application using Fable.Python, where Pydantic models are defined directly in F\# (Models.fs) and compile to Python. The example includes a class-based API (App.fs) with endpoints for managing users and items, supporting CRUD operations via HTTP decorators, and provides a README with build and run instructions.
examples/fastapi · high confidence
New Flask bindings for F\# via Fable.Python
Added the \Fable.Python.Flask\ module, providing F\# bindings for the Python Flask web framework. This enables users to define Flask routes using class-based patterns with decorator attributes (such as \Get\, \Post\, \Put\, \Delete\, and \Patch\) and supports Blueprints for modular application structure. The bindings expose the Flask request object for accessing headers, query parameters, and JSON data, along with response helpers like \jsonify\ and \redirect\, as well as utilities for sessions, flash messages, and error handling.
src/flask · high confidence
New Flask example demonstrating Fable.Python bindings
Added a new example in the \examples/flask\ directory that demonstrates how to build a Flask web application using Fable.Python. The example showcases the decorator-based API pattern (using \\[\<APIClass\>\]\ and \\[\<Get\>\]\) for defining routes, server-side HTML rendering with Feliz.ViewEngine, and styling with Bulma CSS. It includes source files for the main application, navigation, hero section, and head components, along with a README explaining how to build and run the app.
examples/flask · high confidence
New Python standard library bindings for AST, Base64, Collections, Datetime, Functools, Heapq, Html, Itertools, Json, and Logging
This release adds comprehensive F\# type bindings for a wide range of Python standard library modules, enabling direct usage of these features from Fable. The new bindings cover the \ast\ module for parsing and manipulating Python abstract syntax trees, \base64\ for data encoding, \collections\ (including \Counter\, \defaultdict\, and \deque\), \datetime\ for date and time handling, \functools\ for higher-order functions and caching, \heapq\ for heap queue algorithms, \html\ for escaping and unescaping, \itertools\ for efficient looping and combinatorics, \json\ for serialization with Fable-aware type handling, and \logging\ for structured logging. Additionally, a new \CogniteSdk\ module provides bindings for the Cognite Python SDK's time series API.
src/stdlib · high confidence
Behavioural changes
Project restructured with new documentation, build system, and configuration files
The repository has been restructured to improve developer experience and maintainability. A new \justfile\ replaces previous build scripts, providing standardized commands for building, testing, and running examples (Flask, FastAPI, Django, etc.) via the \just\ runner. Documentation has been consolidated into \AGENTS.md\ (replacing \CLAUDE.md\) and \BINDINGS\_GUIDE.md\, with explicit instructions prohibiting manual edits to \CHANGELOG.md\. New configuration files include \.editorconfig\ for F\# formatting, \.fantomasignore\ for script files, \.markdownlint.json\, and \.gitattributes\ for handling generated lock files. The \CHANGELOG.md\ has been rewritten to document versions from 5.0.0-alpha.20 through 5.5.0, and \RELEASING.md\ documents the new ShipIt-based release automation.
(repo-wide) · high confidence
Fixes
Add missing Pydantic models for the example
The pydantic example now includes the previously missing models.py file, which defines the User, Product, CreateUserRequest, and CreateProductRequest Pydantic models used by the F\# integration code.
Fable.Python · high confidence
Test coverage
Added tests for F\# JSON serialization and deserialization; Expanded test coverage for Python standard library and framework bindings.
Dependencies
Initial project scaffolding with multi-targeting and dependency management
The repository is initialized with the core Fable.Python library, a comprehensive test suite, and example applications for Django, FastAPI, Flask, Pydantic, and Timeflies. The project is configured to target .NET frameworks from netstandard2.0 through net10.0, utilizing Paket for .NET dependency resolution (FSharp.Core 6.0, Fable.Core 5.0) and a pyproject.toml for Python dependencies (fable-library 5.17.2, pyright, pytest, ruff, fastapi, pydantic).
(dependencies) · high confidence
Migrated Python dependency management to uv
The project has switched its Python dependency management from the previous system to uv, introducing a new \uv.lock\ file that pins \fable-library\ (0.9.0), \fable-python\ (0.18.0), \python-dateutil\ (2.9.0.post0), and \six\ (1.17.0). This change replaces the prior \paket.references\ file, aligning the F\# Fable compilation with a Python environment managed by uv.
src · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 73 → 73 (-0.4)
- Rubric changed (rubric-2026.09.13 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 98 → 98 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 67 → 67 (+0.0)
- Readiness 77 → 78 (+1.7)
- Security 71 → 69 (-2.6)
Resolved (2)
- Documentation: no licence statement (README.md)
- Medium CVE: [GHSA redacted] (uv.lock)
New (3)
- Documentation: no architecture or design documentation
- End-of-life runtime: .NET net9.0
- High CVE: [GHSA redacted] (uv.lock)
Changes since last survey
- 6 commits — 6 feature/other, 0 fixes
By area
- (root) — 3 commits
- .github/workflows — 2 commits
- .config/dotnet-tools.json — 1 commit
Notable commits
- change: chore: Bump anyio from 4.12.0 to 4.14.2 (#407)
- change: chore: Bump fable-library from 5.17.0 to 5.17.2 (#410)
- change: chore: Bump fantomas from 7.0.6 to 8.0.0 (#412)
- change: chore: Bump github/gh-aw-actions/setup from 0.88.4 to 0.89.7 (#402)
- change: chore: Bump github/gh-aw-actions/setup-cli from 0.88.4 to 0.89.7 (#401)
- change: chore: Bump ruff from 0.16.7 to 0.16.8 (#411)
Architecture
- Unchanged — 0 containers · 3 contexts · 0 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
fable-compiler/Fable.Python was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit cbaabe07f68d3276720654080efe0cc728216134 — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-351388015767.