This project has been archived by its maintainers, and is no longer receiving any updates.
Google Docstring to TSX Converter
A tool that converts Python package docstrings to TSX files for Next.js documentation, with a focus on generating beautiful, interactive documentation.
License
This software is licensed under a custom license agreement. The Albumentations Team and their official contributors have free access to use this software for their projects. All other users must obtain a paid license.
For licensing inquiries, please contact: Vladimir Iglovikov (iglovikov@gmail.com)
See the LICENSE file for full details.
Features
- Converts Google-style docstrings to TSX format with modern UI components
- Preserves type information and parameter descriptions with syntax highlighting
- Maintains the original package structure in the output
- Generates source code with toggle functionality for each class/function
- Supports both class and function documentation
- Creates a table of contents for easy navigation
- Handles module-level docstrings
- Preserves code examples and formatting
- Supports complex type definitions with interactive display
- Generates responsive, dark-themed documentation
Installation
pip install docstring2tsx
Usage
python -m src.docstring2tsx.__main__ --package-name PACKAGE_NAME --output-dir OUTPUT_DIR
or:
docstring2tsx --package-name PACKAGE_NAME --output-dir OUTPUT_DIR
This will:
- Import the specified package
- Extract docstrings from all classes, functions, and modules
- Convert them to TSX format with modern UI components
- Create a directory structure matching the package
- Write TSX files for each module with proper routing
Output Structure
The tool creates a directory structure that matches the input package:
output_dir/
module1/
page.tsx
module2/
submodule/
page.tsx
Each page.tsx file contains:
- Module name and description in a styled container
- Table of contents with links to classes and functions
- Interactive source code display with toggle functionality
- Parameter descriptions with type information
- Return values and exceptions with proper formatting
- Code examples with syntax highlighting
- References and links to related documentation
Development
# Install dependencies
pip install -e .
# Run tests
pytest
# Run pre-commit hooks
pre-commit run --all-files
Metadata
Release files for docstring2tsx 0.0.7
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 |
|---|---|---|---|---|
| docstring2tsx-0.0.7.tar.gz | 15.1 kB | Without provenance | Details for docstring2tsx-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| docstring2tsx-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for docstring2tsx-0.0.7-py3-none-any.whl |
Total release size: 29.8 kB
Release files / docstring2tsx-0.0.7.tar.gz
| Download URL | docstring2tsx-0.0.7.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47ccca9b66850c5167ed6a1dff47607984bedb7fa4a9a9d1101466aa7959a60a
|
|
BLAKE2b-256 checksum How to use checksums |
3f8ae80979ee8052a3bf42b09db92ed3f8e11aa7b7e10b5bc748aac7ee34332b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / docstring2tsx-0.0.7-py3-none-any.whl
| Download URL | docstring2tsx-0.0.7-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7fea04787e8f8e280bfa594c68962fbf73721cdb91a57276a03679dd2f02ee81
|
|
BLAKE2b-256 checksum How to use checksums |
5b17ddd810f54dd57fc020bda563861c5d096159274cd85a6e380fec9787e9ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for docstring2tsx 0.0.7
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.