{"id":23395948,"url":"https://github.com/matthewdeanmartin/markmodule","last_synced_at":"2025-09-09T18:45:02.616Z","repository":{"id":176262823,"uuid":"655325014","full_name":"matthewdeanmartin/markmodule","owner":"matthewdeanmartin","description":"Import python from markdown files.","archived":false,"fork":false,"pushed_at":"2024-02-11T00:07:53.000Z","size":123,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-10T10:48:47.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/matthewdeanmartin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-06-18T15:01:04.000Z","updated_at":"2023-06-18T16:55:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2c7b2e1-7b3d-4f36-8f77-058e1a7c4cae","html_url":"https://github.com/matthewdeanmartin/markmodule","commit_stats":null,"previous_names":["matthewdeanmartin/markmodule"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matthewdeanmartin/markmodule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Fmarkmodule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Fmarkmodule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Fmarkmodule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Fmarkmodule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewdeanmartin","download_url":"https://codeload.github.com/matthewdeanmartin/markmodule/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Fmarkmodule/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259565577,"owners_count":22877348,"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-12-22T07:19:45.188Z","updated_at":"2025-06-15T07:04:29.273Z","avatar_url":"https://github.com/matthewdeanmartin.png","language":"Python","readme":"# markmodule\nImport python from markdown files.\n\n## Usage\n\nIn a file named `hello_module.md` define a function. I'm escaping the fence, use a real three-tick fence.\n\n```markdown\nHere is a function\n\n``(`)python\ndef hello() -\u003e str:\n    return \"Hello\"\n``(`) \n```\n\nGenerate a type stub and import using the usual syntax. `generate_side_by_side_pyi` will write a `.pyi` file to the file system and enable IDEs type hinting to work.\n\n```python\nimport sys\nimport markmodule\nmarkmodule.generate_side_by_side_pyi(\"hello_module\")\nsys.meta_path.append(markmodule.MdFinder())\nimport hello_module\nprint(hello_module.hello())\n```\n\nImport with path to file.\n```python\nimport markmodule\nmarkmodule.import_md(\"hello_module.md\")\nimport hello_module\nprint(hello_module.hello())\n```\n\n## Markdown is a hammer, everything is a nail\n\nYou can use markdown:\n\n- as a place to put module code, [markmodule](https://pypi.org/project/markmodule), this library\n\nThe do-everything-with-markdown ecosystem is surprisingly robust.\n- as a Makefile alternative, [mask](https://github.com/jacobdeichert/mask)\n- as a place to put scripts, eg python's [markdown-exec](https://pypi.org/project/markdown-exec/), or ruby's [markdown_exec](https://github.com/fareedst/markdown_exec)\n- as a place to put unit tests, [pytest-markdown-docs](https://pypi.org/project/pytest-markdown-docs/),  [pytest-codeblocks](https://pypi.org/project/pytest_codeblocks/), and [pytest-markdown](https://pypi.org/project/pytest-markdown/)\n- as a string template, [proof-of-concept gist](https://gist.github.com/facelessuser/53fa4d93f27c252fda813b5e0ba7325c)\n\n\n## Change Log\n\n- 0.1.0 - Basic idea.\n- 0.2.0 - Updates to readme\n- 0.3.0 - Generates pyi and you can use `import` syntax \n\n## Documentation\n\n- [Contributing](https://github.com/matthewdeanmartin/markmoduel/blob/main/docs/contributing.md)\n- [TODO](https://github.com/matthewdeanmartin/markmoduel/blob/main/docs/TODO.md)\n- [Related StackOverflow Links](https://github.com/matthewdeanmartin/markmoduel/blob/main/docs/stackoverflow.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewdeanmartin%2Fmarkmodule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewdeanmartin%2Fmarkmodule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewdeanmartin%2Fmarkmodule/lists"}