This release is a pre-release and may not be stable for production use.
pycloc
Python wrapper for the cloc (Count Lines of Code) command-line tool.
This library provides a convenient, Pythonic interface to the powerful static analysis tool,
enabling you to count lines of code directly from your Python applications with comprehensive
error handling and dynamic configuration.
[!WARNING] This library is currently in Alpha. APIs and core features may change without notice based on community feedback and requests. Documentation may be incomplete or outdated, and you should expect bugs and missing functionalities.
Key Features
- Platform Agnostic: Can run on any operating system out: macOS, Linux and Windows;
- Zero Dependencies: No third-party Python dependencies, only requiring the Perl interpreter;
- Dynamic Configuration: Set CLI tool flags as Python attributes with automatic conversion;
- Comprehensive Error Handling: Custom exception hierarchy for different error scenarios;
- Type Safety: Full type annotations for better IDE support and code quality.
Requirements
- Python: 3.10+
- Perl: 5.6.1+ (required for
clocexecution)
[!NOTE] Since
clocis written in Perl, you must ensure that the interpreter is installed and available in your system'sPATH. This should work out of the box on most Unix-like systems, but may require additional setup on minimalistic Linux distros or Windows.
License
The Python source code in this project is licensed under the MIT License.
[!IMPORTANT] This project bundles the
cloccommand-line program, which is a separate work licensed under the GNU General Public License version 2.0 (GPL-2.0).clocis not part of this project’s source code and remains licensed under GPL-2.0. See THIRD_PARTY_LICENSES.md and LICENSE-GPL-2.0 for details.
Release files for pycloc 0.0.2a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pycloc-0.0.2a0.tar.gz | 325.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pycloc-0.0.2a0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 489.9 kB
Release files / pycloc-0.0.2a0.tar.gz
| Download URL | pycloc-0.0.2a0.tar.gz |
|---|---|
| Size | 325.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4b5315bbaf5c4dbbcbce4845f0ecb4040a190248deb691083af4970b754cee8
|
|
BLAKE2b-256 checksum How to use checksums |
fb1c993722be5de65c85a0da2afe657af25d83375cc59fb7babf5a488cad59a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"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 / pycloc-0.0.2a0-py3-none-any.whl
| Download URL | pycloc-0.0.2a0-py3-none-any.whl |
|---|---|
| Size | 164.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed52f0427bda98fdf01a2e9d7250db97617bf1a5f6240aa9ac6423bbaaa53cf8
|
|
BLAKE2b-256 checksum How to use checksums |
77d9d16232be4fedcb5df23fa5d985587d28b8747f4397078733605ac8b40e00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"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}
|