|
6 | 6 | [Fable](https://github.com/fable-compiler/Fable/tree/beyond) is a compiler that |
7 | 7 | translates F# source files to JavaScript and Python. |
8 | 8 |
|
9 | | -This Fable Python repository contains the Python bindings for Fable. This |
10 | | -library will eventually contain Python (stdlib) bindings for Fable based on |
11 | | -Python [typeshed](https://github.com/python/typeshed). It will also contain |
12 | | -type binding for many other libraries as well such as Flask, MicroBit and many |
13 | | -more. Some bindings have already been added: |
| 9 | +This Fable Python repository is a community driven project that contains the Python type bindings for Fable. The |
| 10 | +library will eventually contain Python (stdlib) bindings for Fable based on Python |
| 11 | +[typeshed](https://github.com/python/typeshed). It will also contain type binding for many other 3rd party libraries |
| 12 | +such as Flask, MicroBit and many more. Some bindings have already been added: |
14 | 13 |
|
15 | 14 | - Python Standard Libray |
16 | 15 | - Jupyter |
17 | 16 | - Flask |
18 | 17 | - MicroBit |
19 | 18 | - CogniteSdk |
20 | 19 |
|
| 20 | +## Version |
| 21 | + |
| 22 | +This library currently targets Python 3.9. Types bindings for other versions of Python should not be added to this |
| 23 | +library until we decide how to deal with Python version handling. |
| 24 | + |
21 | 25 | ## Installation |
22 | 26 |
|
23 | 27 | Prerequisite for compiling F# to Python using Fable: |
@@ -64,11 +68,18 @@ It contains example code for using Fable Python with: |
64 | 68 |
|
65 | 69 | ## Contributing |
66 | 70 |
|
67 | | -If the type binding you are looking for is currently missing (it probably is), |
68 | | -then add it to the relavant files (or add new ones). Open a |
69 | | -[PR](https://github.com/dbrattli/Fable.Python/pull/3/files) to get them |
70 | | -included. There's not much Python specific documentation yet, but the process |
71 | | -of adding type bindings for Python is similar to JS: |
| 71 | +This project is community driven. If the type binding you are looking for is currently missing, then |
| 72 | +you need to add them to the relavant files (or add new ones). Open a [PR](https://github.com/dbrattli/Fable.Python/pull/3/files) to |
| 73 | +get them included. |
| 74 | + |
| 75 | +The `src/stdlib` directory contains type bindings for modules in the Python 3 standard library. We also accept type |
| 76 | +bindings for 3rd party libraries as long as: |
| 77 | + |
| 78 | +- the package is publicly available on the [Python Package Index](https://pypi.org/); |
| 79 | +- the package supports any Python version supported by Fable Python; and |
| 80 | +- the package does not ship with its own stubs or type annotations |
| 81 | + |
| 82 | +There's not much Python specific documentation yet, but the process of adding type bindings for Python is similar to JS: |
72 | 83 |
|
73 | 84 | - https://fable.io/docs/communicate/js-from-fable.html |
74 | 85 | - https://medium.com/@zaid.naom/f-interop-with-javascript-in-fable-the-complete-guide-ccc5b896a59f |
@@ -98,5 +109,3 @@ Current plan: |
98 | 109 | 1. Add bindings for Python `ast` module (in progress) |
99 | 110 | 2. Use `ast` module to parse Python typeshed annotations |
100 | 111 | 3. Generate F# bindings |
101 | | - |
102 | | - |
|
0 commit comments