Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pycloc

pycloc logo

License Documentation GitHub release PyPI

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 cloc execution)

[!NOTE] Since cloc is written in Perl, you must ensure that the interpreter is installed and available in your system's PATH. 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 cloc command-line program, which is a separate work licensed under the GNU General Public License version 2.0 (GPL-2.0). cloc is 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)

Source distribution for pycloc 0.0.2a0
File Size Uploaded
pycloc-0.0.2a0.tar.gz 325.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycloc 0.0.2a0
File Interpreter ABI Platform
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}

Release history Release notifications | RSS feed

This release

0.0.2a0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page