You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59-29Lines changed: 59 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,29 @@ This is a comprehensive guide to [Fable.Python](https://github.com/fable-compile
7
7
## Chapters
8
8
9
9
1.**Introduction** - What is Fable.Python and why use it
10
-
2.**Getting Started** - Setup, your first project, hello world
11
-
3.**Bindings** - Python interop and type bindings
12
-
4.**Compatibility** - Supported F# features and limitations
13
-
5.**Fable v5** - What's new in Fable v5 for Python
14
-
6.**Pydantic** - Pydantic interop with Decorate and ClassAttributes
15
-
7.**Units of Measure** - Compile-time dimensional analysis
16
-
17
-
## The Meta Twist
18
-
19
-
This guide is self-documenting: each chapter is an `.fs` file with embedded Markdown comments using FSharp.Formatting conventions. **Fabletext**, a literate converter inspired by [jupytext](https://github.com/mwouts/jupytext) (also written in F# and transpiled via Fable.Python), processes these files to generate the final Markdown output.
10
+
2.**For Python Developers** - F# concepts explained for Pythonistas
11
+
3.**Getting Started** - Setup, your first project, hello world
12
+
4.**Interop** - Using existing Python libraries and Fable.Python bindings
13
+
5.**Bindings** - Creating your own type-safe bindings for Python libraries
14
+
6.**Compatibility** - Supported F# features and limitations
15
+
7.**Fable v5** - What's new in Fable v5 for Python
9.**Pydantic** - Pydantic interop with Decorate and ClassAttributes
18
+
10.**Units of Measure** - Compile-time dimensional analysis
19
+
11.**Testing** - XUnit and Fable.Pyxpecto *(coming soon)*
20
+
12.**Fabletext: The Strange Loop** - The self-documenting finale
21
+
22
+
## The Strange Loop
23
+
24
+
This guide is self-documenting: each chapter is an `.fs` file with embedded Markdown comments. **Fabletext** (the final chapter) processes these files to generate the documentation you're reading - including itself.
25
+
26
+
The chain:
27
+
1. Write F# with embedded Markdown (`chapters/*.fs`)
28
+
2. Compile to Python with Fable
29
+
3. Run Fabletext (F# compiled to Python) to extract documentation
30
+
4. Output: the Markdown you're reading
31
+
32
+
The blog post is its own proof of concept.
20
33
21
34
## Quick Start
22
35
@@ -41,7 +54,7 @@ just restore # Restore NuGet packages
41
54
just build # Compile F# to Python with Fable
42
55
just generate # Convert chapters to individual markdown files
43
56
just blogpost # Generate concatenated blogpost.md for publishing
44
-
just format # Format Python files with ruff
57
+
just format # Format F# (fantomas) and Python (ruff) files
45
58
just lint # Lint Python (ruff) and Markdown (markdownlint)
46
59
just all # Full pipeline: restore, build, generate, format, lint
47
60
just clean # Remove generated files
@@ -51,47 +64,64 @@ just clean # Remove generated files
51
64
52
65
```text
53
66
chapters/
54
-
├── 01-introduction.fs # What is Fable.Python
55
-
├── 02-getting-started.fs # Setup and first project
0 commit comments