repo2word
Convert a Python package directory (the folder that directly contains the root __init__.py) into a single Word (.docx) file: each *.py file is a section with a path heading, line numbers, and syntax-highlighted code.
Requirements
- Python 3.14+
- Pandoc installed and on your
PATH(or passpandoc_path=to the API)
On macOS: brew install pandoc. On Ubuntu/Debian: sudo apt-get install pandoc.
Installation
pip install repo2word
(or uv add repo2word). Pandoc is an external dependency and is not installed by pip — see Requirements.
Usage
from pathlib import Path
from repo2word import repo2word
repo2word(Path("path/to/mypackage"), Path("out.docx"))
path/to/mypackage must be the package root (it must contain __init__.py). The parent directory of the output .docx must already exist unless you pass mkdir_parents=True.
Development
uv sync --all-groups
uv run ruff check . && uv run ruff format .
uv run mypy .
uv run pytest
License
Metadata
Release files for repo2word 0.0.1
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 | |
|---|---|---|---|---|
| repo2word-0.0.1.tar.gz | 12.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| repo2word-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.0 kB
Release files / repo2word-0.0.1.tar.gz
| Download URL | repo2word-0.0.1.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a55a42f4ec5257e5ab20717a7e221fd819a89b118a8f29205ee84975b96d0a02
|
|
BLAKE2b-256 checksum How to use checksums |
c93b2f7ae3b8de8c74ddde072e6411359b3aebb8565aaefbb28de0347967fd64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 19, 2026.
Transparency logRelease files / repo2word-0.0.1-py3-none-any.whl
| Download URL | repo2word-0.0.1-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6aedd3812b580d5e2809e60803a320fcd38c978902b30c5192f56bca04c90e72
|
|
BLAKE2b-256 checksum How to use checksums |
795a733b050a2c51bf09956b0a53252541c1e71c7eceb5e7c00607cf669819ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 19, 2026.
Transparency logSecurity for repo2word 0.0.1
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for repo2word-0.0.1.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 Jun 19, 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.