{"id":13869974,"url":"https://github.com/kiwi0fruit/ipynb-py-convert","last_synced_at":"2025-10-02T11:31:19.720Z","repository":{"id":34068577,"uuid":"167141397","full_name":"kiwi0fruit/ipynb-py-convert","owner":"kiwi0fruit","description":"Convert .py files runnable in VSCode or Atom/Hydrogen to Jupyter .ipynb notebooks and vice versa","archived":false,"fork":true,"pushed_at":"2022-04-06T17:43:49.000Z","size":445,"stargazers_count":46,"open_issues_count":2,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-15T21:15:19.129Z","etag":null,"topics":["atom-editor","converter","ipynb","jupyter","vscode"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"nojvek/vscode-ipynb-py-converter","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiwi0fruit.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":"2019-01-23T07:54:04.000Z","updated_at":"2024-10-25T06:46:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kiwi0fruit/ipynb-py-convert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi0fruit%2Fipynb-py-convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi0fruit%2Fipynb-py-convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi0fruit%2Fipynb-py-convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi0fruit%2Fipynb-py-convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiwi0fruit","download_url":"https://codeload.github.com/kiwi0fruit/ipynb-py-convert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234983162,"owners_count":18917425,"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":["atom-editor","converter","ipynb","jupyter","vscode"],"created_at":"2024-08-05T20:01:23.916Z","updated_at":"2025-10-02T11:31:14.441Z","avatar_url":"https://github.com/kiwi0fruit.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# ipynb-py-convert\n\nAtom/Hydrogen or VSCode/Python allows creating a python files split into cells with `# %%` separators with the ability to run cells via backend Jupyter session and interactively show results back.\n\nMore examples: [Jupyter Python VSCode examples](https://github.com/DonJayamanne/pythonVSCode/wiki/Jupyter-Examples), [Atom/Hydrogen Getting Started](https://nteract.gitbooks.io/hydrogen/docs/Usage/GettingStarted.html).\n\n[ipynb-py-convert](https://pypi.python.org/pypi/ipynb-py-convert) python module converts files: .ipynb to .py and .py to .ipynb.\n\n**ipynb-py-convert** is a fork of the [vscode-ipynb-py-converter](https://github.com/nojvek/vscode-ipynb-py-converter).\n\n\n## Install\n\n```bash\nconda install -c defaults -c conda-forge ipynb-py-convert\n```\nor\n```bash\npip install ipynb-py-convert\n```\n\n\n## Troubleshooting\n\n* If encoding problems on Windows try using `python\u003e=3.7`, setting `set PYTHONUTF8=1` in Windows console and use `ipynb-py-convert` for UTF-8 files only. If using [Git-Bash on Windows](https://git-scm.com/download/win) setting:\n\n```bash\nexport LANG=C.UTF-8\nexport PYTHONIOENCODING=utf-8\nexport PYTHONUTF8=1\n```\nshould be enough. Also try setting default Bash settings to UTF-8: [Options] - [Text] - [Locale / Character set] - [C / UTF-8]. It might affect all Bash runs so there would be no need to setting encoding every time. \n\n\n## Example\n\n`ipynb-py-convert examples/plot.py examples/plot.ipynb`\n\nor\n\n`ipynb-py-convert examples/plot.ipynb examples/plot.py`\n\n\n**VSCode**\n\n![](https://github.com/kiwi0fruit/ipynb-py-convert/raw/master/examples/vscode.png)\n\nMarkdown cells are converted to python multiline strings `'''`. Code cells are left as is. `# %%` is used by vscode as the cell marker on which 'Run Cell' action is available.\n\n\n**Jupyter ipynb notebook**\n\n![](https://github.com/kiwi0fruit/ipynb-py-convert/raw/master/examples/jupyter.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiwi0fruit%2Fipynb-py-convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiwi0fruit%2Fipynb-py-convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiwi0fruit%2Fipynb-py-convert/lists"}