🏳️⚧️🐍 Transdoc Python
A Transdoc handler for Python docstrings.
Installation
# Use your dependency manager of choice
uv add transdoc[python]
poetry add transdoc[python]
pip install transdoc[python]
Usage
Transdoc rules are applied to Python docstrings.
For example, given the following rule:
def mdn_link(e: str) -> str:
'''
Return a Markdown-formatted link to MDN's documentation of an HTML element.
'''
return (
f"[View `<{e}>` on MDN]"
f"(https://developer.mozilla.org/en-US/docs/Web/HTML/Element/{e})"
)
The following Python function's docstring would be transformed as follows:
# Before
def make_link(text: str, href: str) -> str:
'''
Generate an HTML link.
{{mdn_link[a]}}
'''
# Please don't write code this insecure in real life
return f"<a href={href}>{text}</a>"
# After
def make_link(text: str, href: str) -> str:
'''
Generate an HTML link.
[View `<a>` on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
'''
# Please don't write code this insecure in real life
return f"<a href={href}>{text}</a>"
Metadata
Release files for transdoc-python 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| transdoc_python-0.1.5.tar.gz | 3.0 kB | Without provenance | Details for transdoc_python-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| transdoc_python-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for transdoc_python-0.1.5-py3-none-any.whl |
Total release size: 7.5 kB
Release files / transdoc_python-0.1.5.tar.gz
| Download URL | transdoc_python-0.1.5.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f3507df984d78d421cd20deed49af083012a4f6802e168551e0ef30c23552dc
|
|
BLAKE2b-256 checksum How to use checksums |
14ef0f16584af57ea1cf6211f41a5a7fdd8b8f3d2419cd1a056e5b141f457bf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / transdoc_python-0.1.5-py3-none-any.whl
| Download URL | transdoc_python-0.1.5-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12e604275d8b624aada0917bbeab31b25607962d60a635e0b193b2516d3696e8
|
|
BLAKE2b-256 checksum How to use checksums |
af2b9c748ec79b820f134d7cb471eabc04c04d0ee40df66d6afa3617035c1017
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for transdoc-python 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.