sphinxify
Convert Javadoc and Doxygen to Sphinx reStructuredText docstrings.
Why?
The RobotPy project ports Java libraries to Python.
A converter was originally written in HTML + JavaScript, but then the need to be able to programmatically convert doc comments arose.
This also makes it easier to use in certain editors such as vim...
Usage
Run sphinxify and give it a Javadoc comment. It will keep reading until EOF.
If a Java function prototype is also given, sphinxify will also output a Python type-hinted function signature.
You can also run sphinxify server and it will pop up a browser that you can
use to run sphinxify on the input also.
There is also a sphinxify yaml mode for the robotpy-ctre.
Transforming code examples
Doc.from_comment, process_doc, and process_raw accept an optional
keyword-only code_block_transform callback:
from sphinxify import CodeBlockReplacement, process_doc
def python_example(block):
if block.index == 0:
return CodeBlockReplacement("timer.start()", language="python")
return None # Preserve other blocks, including diagrams.
rst = process_doc(comment, code_block_transform=python_example)
The callback receives a CodeBlock with text, optional language, kind
(doxygen, pre, or fence), and a zero-based index. Indices follow source
order across the whole comment, including parameter, return, and deprecation
sections. Return a CodeBlockReplacement(text, language=None) to replace a
block, or None to retain its content and language. The API is language-neutral;
it does not translate source code automatically.
Supported block forms include @code/\\code (with optional {.cpp} language
annotations), <pre>, <pre><code>, and Markdown backtick/tilde fences.
Doxygen and HTML delimiters may share a line with code or surrounding prose.
Inline {@code ...} expressions are not blocks. Unterminated recognized blocks
raise ValueError with their kind and index.
Blocks retain relative indentation and internal blank lines. Labeled blocks
render as .. code-block:: language; unlabeled blocks use reST literal blocks.
They remain in their original documentation section.
To run the tests, install tests/requirements.txt, then run python -m pytest
from the repository root.
Metadata
Release files for sphinxify 0.14
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 |
|---|---|---|---|---|
| sphinxify-0.14.tar.gz | 10.4 kB | With provenance | Details for sphinxify-0.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinxify-0.14-py3-none-any.whl | Python 3 | none | any | Details for sphinxify-0.14-py3-none-any.whl |
Total release size: 22.3 kB
Release files / sphinxify-0.14.tar.gz
| Download URL | sphinxify-0.14.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b31dd30e7017dd298abb1357d887ef2de8ab3d2f56862c5efa9edbf5ea83da7
|
|
BLAKE2b-256 checksum How to use checksums |
d76cbcfb9518bf5985a5246040c7ac9f8a374e7107d9129e454878eb277af0a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / sphinxify-0.14-py3-none-any.whl
| Download URL | sphinxify-0.14-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f6e2f861c2d47abde7416616ddffdf259292deb87440b096510cae84daea746
|
|
BLAKE2b-256 checksum How to use checksums |
6f2b9fcc42a55dbebf074e6947007d01193fdddfdc348270fae927e0af4cf5d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for sphinxify 0.14
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sphinxify-0.14.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA 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.