strip-docs
A Python utility to remove all docstrings from your modules before shipping
Info-anarchized from this Stack Overflow post
Usage
Just install it via pip
pip install strip-docs
And then launch it on any list of files or directories that you would like to see the docstrings gone, this way:
strip-docs dir1 dir2 file1 file2 ...
All .py, .pyx and .pxd files will be processed.
If you specify a single file, it will be processed
Caveats
Try to avoid writing empty classes or routines like this:
def empty_routine():
"""I am an empty routine"""
Because the syntax itself is not analyzed, this will result in a Python SyntaxError.
Better write this:
def empty_routine():
"""I am an empty routine"""
...
So after trimming the docstrings it remains valid Python.
Metadata
Release files for strip-docs 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| strip_docs-1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for strip_docs-1.0-py2.py3-none-any.whl |
Release files / strip_docs-1.0-py2.py3-none-any.whl
| Download URL | strip_docs-1.0-py2.py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4091f73f2bb490a275f90bec264b76da8a5608cd81d99e37ac016badb4913cad
|
|
BLAKE2b-256 checksum How to use checksums |
48f08335c1e020429de0bd72fa4e3876e234c0cf3cb4d5d0faee858d38c5b01d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.0
|
Security for strip-docs 1.0
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.