Skip to main content
Help us improve Python packaging – donate today!

Python interface to coveralls.io API

Project Description

====================================
Python interface to coveralls.io API
====================================

.. image:: https://api.travis-ci.org/z4r/python-coveralls.png?branch=master
:target: http://travis-ci.org/z4r/python-coveralls
.. image:: https://coveralls.io/repos/z4r/python-coveralls/badge.png?branch=master
:target: https://coveralls.io/r/z4r/python-coveralls
.. image:: https://pypip.in/v/python-coveralls/badge.png
:target: https://crate.io/packages/python-coveralls/
.. image:: https://pypip.in/d/python-coveralls/badge.png
:target: https://crate.io/packages/python-coveralls/

This package provides a module to interface with the https://coveralls.io API.

INSTALLING THE PKG
==================
Using pip::

$ pip install python-coveralls

...Or simply add it to your requirements.


CONFIGURATION
=============
If you're not using Travis, Coveralls for Python uses a ``.coveralls.yml`` file at the root level of your repository to configure options.
The only required option is ``repo_token`` (found on your repository's page on Coveralls) to specify which project on Coveralls your project maps to.
Another important option is is ``service_name`` which allows you to specify where Coveralls should look to find additional information about your builds. This can be any string, but using travis-ci or travis-pro will allow Coveralls to fetch branch data, comment on pull requests, and more.
A ``.coveralls.yml`` file configured for Travis Pro:

.. code-block:: yaml

repo_token: abcdef1234569abdcef
service_name: travis-pro

if you don't want the ``repo_token`` under source control, set it in your ``coveralls`` command::

COVERALLS_REPO_TOKEN=abcdef1234569abdcef coveralls

TRAVIS.YML
==========
Create a ``.coverage`` file and you can use `coverage <https://pypi.python.org/pypi/coverage>`_,
`pytest-cov <https://pypi.python.org/pypi/pytest-cov>`_, or
`nosexcover <https://pypi.python.org/pypi/nosexcover>`_.
Then you can add in the **after_success** step::

coveralls

It should look like something like:

.. code-block:: yaml

language: python
python:
- "2.6"
- "2.7"
install:
- pip install -e . --use-mirrors
before_script:
- pip install -r test_requirements.txt --use-mirrors
- git clone https://github.com/z4r/python-coveralls-example.git
- cd python-coveralls-example
- git checkout -qf 17b8119796516195527dcb4f454a2ebd41d60244
- py.test example/tests.py --cov=example
- cd -
script:
- py.test coveralls/tests.py --doctest-modules --pep8 coveralls -v --cov coveralls --cov-report term-missing
after_success:
- coveralls

COVERALLS OPTIONS
=================
You probably don't need to configure anything, but if you customize some option of `coverage` you would add it to `coveralls` too::

$ coveralls -h
usage: coveralls [-h] [--coveralls_url COVERALLS_URL] [--base_dir BASE_DIR]
[--data_file DATA_FILE] [--config_file CONFIG_FILE]
[--coveralls_yaml COVERALLS_YAML] [--ignore-errors]

optional arguments:
-h, --help show this help message and exit
--coveralls_url COVERALLS_URL, -u COVERALLS_URL
coveralls.io api url
--base_dir BASE_DIR, -b BASE_DIR
project root directory
--data_file DATA_FILE, -d DATA_FILE
coverage file name
--config_file CONFIG_FILE, -c CONFIG_FILE
coverage config file name
--coveralls_yaml COVERALLS_YAML, -y COVERALLS_YAML
coveralls yaml file name
--ignore-errors, -i gnore errors while reading source files




.. image:: https://d2weczhvl823v0.cloudfront.net/z4r/python-coveralls/trend.png
:alt: Bitdeli badge
:target: https://bitdeli.com/free

Release history Release notifications

History Node

2.9.1

History Node

2.9.0

History Node

2.8.0

History Node

2.7.0

History Node

2.6.0

History Node

2.5.0

History Node

2.4.3

This version
History Node

2.4.2

History Node

2.4.1

History Node

2.4.0

History Node

2.2.0

History Node

2.1.0

History Node

2.0.0

History Node

1.1

History Node

1.0.1

History Node

1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
python_coveralls-2.4.2-py2.py3-none-any.whl (11.1 kB) Copy SHA256 hash SHA256 Wheel 2.7 Jan 13, 2014
python-coveralls-2.4.2.tar.gz (6.8 kB) Copy SHA256 hash SHA256 Source None Nov 27, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page