{"id":19542574,"url":"https://github.com/fable-compiler/fable.jupyter","last_synced_at":"2025-04-26T17:31:18.106Z","repository":{"id":57428019,"uuid":"330433073","full_name":"fable-compiler/Fable.Jupyter","owner":"fable-compiler","description":"F# (Fable) support for Jupyter","archived":false,"fork":false,"pushed_at":"2022-09-18T11:23:16.000Z","size":181,"stargazers_count":30,"open_issues_count":2,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-04T16:41:53.818Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fable-compiler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-17T16:19:35.000Z","updated_at":"2023-08-23T18:58:22.000Z","dependencies_parsed_at":"2022-09-09T05:01:09.969Z","dependency_job_id":null,"html_url":"https://github.com/fable-compiler/Fable.Jupyter","commit_stats":null,"previous_names":["dbrattli/fable.jupyter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fable-compiler%2FFable.Jupyter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fable-compiler%2FFable.Jupyter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fable-compiler%2FFable.Jupyter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fable-compiler%2FFable.Jupyter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fable-compiler","download_url":"https://codeload.github.com/fable-compiler/Fable.Jupyter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251025747,"owners_count":21524856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T03:15:07.693Z","updated_at":"2025-04-26T17:31:17.809Z","avatar_url":"https://github.com/fable-compiler.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# F# and Fable (Python) support for Jupyter\n\nFable Python is an F# kernel for Jupyter based on [Fable](https://fable.io) and\n[IPythonKernel](https://github.com/ipython/ipykernel). Fable is a transpiler\nthat converts [F#](https://fsharp.org) to Python (and JavaScript).\n\nThis work is work-in-progress and related to\n\n- https://github.com/fable-compiler/Fable/issues/2339\n- https://github.com/fable-compiler/Fable/pull/2345\n\n## Install\n\nMake sure you have a recent version of .NET installed on your machine:\nhttps://dotnet.microsoft.com/download\n\nYou also need to install the latest `fable-py` .NET tool globally (and\nmake sure it's available in PATH environment)\n\n```sh\ndotnet tool install -g fable --prerelease\n\npip install fable-py\npython -m fable_py install\n```\n\nTo use the very latest changes (for development):\n\n```sh\ngit clone https://github.com/dbrattli/Fable.Jupyter.git\ncd Fable.Jupyter\npython setup.py develop\npython -m fable_py install\n```\n\n## Usage\n\nYou can use Fable Python in the Jupyter notebook by selecting the \"F#\n(Fable Python)\" kernel. To start Jupyter run e.g:\n\n```shell\njupyter notebook\n\n# or\n\njupyter lab\n```\n\n## Magic commands\n\nYou can inspect the generated Python code by executing `%python` in a cell:\n\n```\n%python\n```\n\nYou can inspect the maintained F# program by executing `%fsharp` in a cell:\n\n```\n%fsharp\n```\n\n## F# Program\n\nThe kernel works by maintaining an F# program `Fable.fs` behind the\nscenes. This program lives in a separate `tmp` folder for each instance\nof the kernel.\n\nSometimes the generated F# program might become invalid because of the\nsubmitted code fragments (this can happen with a Python notebook as well).\nThe way to recover is to reset the kernel. That will reset the F#\nprogram that is running behind the notebook. To reset the kernel select\non the menu: `Kernel -\u003e Restart` or `Kernel -\u003e Restart \u0026 Clear Output`.\n\nor you can use the reset command:\n\n```\n%reset\n```\n\nIf you need additional package references you currently need to add them\nmanually to the `Fable.fsproj` project file. TODO: handle `#r nuget \"...` commands from within the notebook.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffable-compiler%2Ffable.jupyter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffable-compiler%2Ffable.jupyter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffable-compiler%2Ffable.jupyter/lists"}