Registry / testing / python-coveralls

python-coveralls

JSON →
library2.9.3pypypi✓ verified 85d ago

python-coveralls is a Python interface to the coveralls.io API, enabling continuous integration services to send test coverage reports for Python projects. It integrates with `coverage.py` to process coverage data and send it to Coveralls.io. The current version is 2.9.3, and releases are generally made to address `coverage.py` compatibility, Python version support, or minor bug fixes, rather than on a fixed cadence.

pip install python-coveralls
INSTALL
IMPORT
SIG · PYTHON-COVERALLS
P
python-coveralls
testingpythonv2.9.3
Install
2.9s avg
Import
Disk
24MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.9.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 25MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.9s · import 0.000s · 26MB
24MB installed
● package 24MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse_args
from coveralls import parse_args
from coveralls import Coveralls
wear
from coveralls import wear
from coveralls import Coveralls

This quickstart demonstrates the typical workflow: first, generate coverage data using `coverage.py` after running your tests, and then use the `coveralls` command-line tool to send the `.coverage` report to Coveralls.io. Ensure the `COVERALLS_REPO_TOKEN` is set, especially in CI environments.

# 1. Install necessary packages pip install coverage python-coveralls # 2. Run your tests with coverage.py to generate .coverage data # Replace 'pytest' with your actual test runner (e.g., 'python -m unittest discover') # Replace 'your_module_name' with the actual name of your package/module to cover coverage run --source=your_module_name -m pytest # 3. Send the coverage report to Coveralls.io # Set your repository token as an environment variable. # In CI environments (e.g., GitHub Actions, Travis CI), this is often handled automatically # or provided securely. For local testing, ensure it's exported in your shell. # Using a placeholder; replace with your actual token. export COVERALLS_REPO_TOKEN='YOUR_ACTUAL_COVERALLS_REPO_TOKEN' # Now run the coveralls command-line tool coveralls
coveralls --version
Debug
Known issues
gotchapython-coveralls relies on `coverage.py` to generate the `.coverage` data file. If this file is missing, empty, or not found in the expected location, `coveralls` will report 'No coverage data found'.
fix
Always run your tests with `coverage run` (e.g., `coverage run --source=your_package -m pytest`) before invoking `coveralls`. Verify a `.coverage` file is created and contains data.
affects: All versions
gotchaA `COVERALLS_REPO_TOKEN` environment variable or a `.coveralls.yml` file with a `repo_token` is required for authentication with Coveralls.io. Without it, the report will fail to upload.
fix
Set `COVERALLS_REPO_TOKEN` in your CI environment or locally (e.g., `export COVERALLS_REPO_TOKEN=YOUR_TOKEN`). For CI services, sometimes `CI` environment variables are sufficient, but providing the token is the most robust approach.
affects: All versions
breakingPython 2 support was dropped in version 2.0.0. Projects using Python 2 must use `python-coveralls<2.0.0`.
fix
Upgrade your project to Python 3 or pin `python-coveralls` to a version less than 2.0.0 (e.g., `pip install python-coveralls==1.11.0`).
affects: >=2.0.0
gotchaThe `coveralls` command can fail to detect repository details (like branch name) if executed outside of a recognized CI environment or a Git repository, leading to `KeyError` or incomplete reports.
fix
Ensure the command runs in a Git repository context, or explicitly provide git details via environment variables (e.g., `COVERALLS_BRANCH`) or a `.coveralls.yml` configuration file.
affects: All versions
Upgrade
Version history
2.9.3latest on PyPI · released Aug 1, 2019
Audit
Dependencies
coveragerequiredRequired to generate coverage data files (.coverage) that python-coveralls processes.
Agent activity
16 hits · last 30 days
node
12
OpenAI (training)
1
Resources
python-coveralls — pip install python-coveralls · libregistry