{"id":37958725,"url":"https://github.com/luevano/pymdvar","last_synced_at":"2026-01-16T18:02:15.928Z","repository":{"id":65938072,"uuid":"601475135","full_name":"luevano/pymdvar","owner":"luevano","description":"Python-Markdown extension for key-value pair conversion.","archived":false,"fork":false,"pushed_at":"2023-02-17T08:08:21.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-31T02:23:48.278Z","etag":null,"topics":["extension","html","markdown","python-markdown","website"],"latest_commit_sha":null,"homepage":"https://luevano.xyz/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luevano.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"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":"AUTHORS"}},"created_at":"2023-02-14T06:21:51.000Z","updated_at":"2023-02-17T08:07:23.000Z","dependencies_parsed_at":"2023-04-05T21:01:08.310Z","dependency_job_id":null,"html_url":"https://github.com/luevano/pymdvar","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"3cf528e4b82466e2680c86985e1a80993548e56c"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/luevano/pymdvar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luevano%2Fpymdvar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luevano%2Fpymdvar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luevano%2Fpymdvar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luevano%2Fpymdvar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luevano","download_url":"https://codeload.github.com/luevano/pymdvar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luevano%2Fpymdvar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["extension","html","markdown","python-markdown","website"],"created_at":"2026-01-16T18:02:15.857Z","updated_at":"2026-01-16T18:02:15.913Z","avatar_url":"https://github.com/luevano.png","language":"Python","readme":"# pymdvar - Python-Markdown Variable extension\n\nSimple extension meant to be used to convert variables to their corresponding values. Works with environment variables too. This is really just built to be used with my other project [pyssg](https://github.com/luevano/pyssg), as I need it there but I figured it could be released as an extension.\n\nIt uses the `${variable}` syntax. For example, given `variable=value`, the following text:\n\n```md\nFoo ${variable} bar\n```\n\nBecomes:\n\n```html\n\u003cp\u003eFoo value bar\u003c/p\u003e\n```\n\n## Install\n\n`pymdvar` can be installed via `pip`:\n\n```sh\npython -m pip install pymdvar\n```\n\n## Usage\n\nThe basic usage requires a dictionary with the variables to be passed to the `VariableExtension` options:\n\n```py\n\u003e\u003e\u003e import markdown\n\u003e\u003e\u003e from pymdvar import VariableExtension\n\u003e\u003e\u003e markdown.markdown('foo *${test}* bar', extensions=[VariableExtension(variables={'test': 'value'})])\n'\u003cp\u003efoo \u003cem\u003evalue\u003c/em\u003e bar\u003c/p\u003e'\n```\n\nif `enable_env=True` option is set, then it will read environment variables, too. Variables in `variables` take preference.\n\nSyntax for the variables should only include the characters: `a-z`, `A-Z`, `_` and `0-9`; this limitation is set like this by personal preference, as the \"variable\" could be any string, could even include spaces and special chars. Variables not found are just replaced by an empty string.\n\nPassing the extension as a string is supported:\n\n```py\n\u003e\u003e\u003e import markdown\n\u003e\u003e\u003e markdown.markdown('foo *${test}* bar', extensions=['pymdvar'], extension_configs={'pymdvar': {'variables': {'test': 'value'}}})\n'\u003cp\u003efoo \u003cem\u003evalue\u003c/em\u003e bar\u003c/p\u003e'\n```\n\n## Options\n\nOnly supported options:\n\n- `variables` (default `dict()`):\n\n    Dictionary containing key-value pairs for variable-values. Example\n\n    ```py\n    variables={'test': 'value', 'key': 'value'}\n    ```\n- `enable_env` (default `False`):\n\n    Enables environment variable reading.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluevano%2Fpymdvar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluevano%2Fpymdvar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluevano%2Fpymdvar/lists"}