Skip to main content

Python wrapper for the cloc CLI tool

Project description

pycloc

PyPI

pycloc logo

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycloc-0.0.1a0.tar.gz (315.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycloc-0.0.1a0-py3-none-any.whl (162.6 kB view details)

Uploaded Python 3

File details

Details for the file pycloc-0.0.1a0.tar.gz.

File metadata

  • Download URL: pycloc-0.0.1a0.tar.gz
  • Upload date:
  • Size: 315.9 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for pycloc-0.0.1a0.tar.gz
Algorithm Hash digest
SHA256 df8320b513cb7c1a392fad1cf066835792f88a42a144994840505a9f681f2a68
MD5 eab358477f57d3dd08d4b9114151491c
BLAKE2b-256 b992da038e21e9a019686954263802949952fd6147172e4f241e37908955537c

See more details on using hashes here.

File details

Details for the file pycloc-0.0.1a0-py3-none-any.whl.

File metadata

  • Download URL: pycloc-0.0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 162.6 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for pycloc-0.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 c472e6c8ea6f10d97a7455981cf01e828f5ba3bcf5855b0dbb463a61966ea084
MD5 c649b1361fcec037c44c0eabce319eec
BLAKE2b-256 84773b056f80816acdade4139009af8918b0c6b1b267466b28a2b2650799183e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page