Skip to main content

A tool to count lines of code in a Python project

Project description

pycodestats

pycodestats is a tool to count lines of code, classes, and methods in a Python project. It can scan directories recursively and provides summary statistics for each file or directory.

Features

  • Counts lines of code (excluding comments and docstrings)
  • Counts number of classes and methods
  • Outputs results in table, JSON, or XML format

Installation

You can install pycodestats using pip:

pip install pycodestats

Usage

To scan a directory and output results in table format:

pycodestats path/to/your/project

To output results in JSON format:

pycodestats path/to/your/project --json

To output results in XML format:

pycodestats path/to/your/project --xml

Example

pycodestats src --by-file

This will output the statistics for each Python file in the src directory.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

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

pycodestats-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

pycodestats-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pycodestats-0.1.0.tar.gz.

File metadata

  • Download URL: pycodestats-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pycodestats-0.1.0.tar.gz
Algorithm Hash digest
SHA256 58e814f86f53e294f9e17751732704fbd502200b145a473e87d9123cd6dee5cc
MD5 1fd1051e80624b241ec0859868eb1f67
BLAKE2b-256 79998d95cfb90aab744466a631760ddb966ff5580a5a6a187dca327a36b1e291

See more details on using hashes here.

File details

Details for the file pycodestats-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pycodestats-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pycodestats-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d86f14c6e35655f9303ed060b95d23e04a203497e73141033618625d038d45c9
MD5 258c317fcba554123ed6f28a7fb48de1
BLAKE2b-256 acd5029e0caff8fb57ba04e6ba91a9ba941ecc86d9a585395450c26dce1c0281

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