Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python API for the Kiwi TCMS test case management system

Project Description

This package consists of a high-level Python module (provides natural object interface), a low-level driver (allows to directly access Kiwi’s xmlrpc API) and a command line interpreter (useful for fast debugging and experimenting).


Among the most essential features are:

  • Natural and concise Python interface
  • Custom level of caching & logging
  • Automated status coloring
  • Integrated test suite
  • Utility functions

The main motivation was to hide unnecessary implementation details wherever possible so that using the API is as concise as possible.

Scripts importing tcms_api can make use of several useful helper functions including info() for logging to stderr, listed() which converts list into nice human readable form, color() for coloring and of course log.{debug,info,warn,error} for logging.


Initialize or create an object:

testcase = TestCase(1234)
testrun = TestRun(testplan=<plan>, summary=<summary>)

Default iterators provided for all container objects:

for case in TestRun(1234):
    if case.automated:
        case.status = Status("RUNNING")

Linking case to a plan is as simple as adding an item to a set:


However, it’s still possible to use the low-level driver when a specific features is not implemented yet or not efficient enough:

inject = TCMS()._server.TestCase.get(46490)

For a quick start you can get some inspiration in the script_examples directory. The ‘’ script demonstrates how to easily display a matrix view of the test run results for a specific test plan. The ‘’ script gives a broader overview covering object creation, attribute setting, adjusting logs and caching.

For area-specific details see respective module documentation:

tcms_api.base ......... TCMS class, search support
tcms_api.config ....... Configuration, logging, coloring, caching
tcms_api.containers ... Container classes implementation
tcms_api.immutable .... Immutable TCMS objects
tcms_api.mutable ...... Mutable TCMS objects
tcms_api.tests ........ Test suite
tcms_api.utils ........ Utilities
tcms_api.xmlrpc ....... XMLRPC driver


pip install tcms-api


To be able to contact the Kiwi TCMS server a minimal user config file ~/.tcms.conf has to be provided in the user home directory:

url = https://kiwi.server/xml-rpc/
username = myusername
password = mypassword


High-level Python module: Petr Šplíchal, Zbyšek Mráz, Martin Kyral, Lukáš Zachar, Filip Holec, Aleš Zelinka, Miroslav Vadkerti, Leoš Pol and Iveta Wiedermann.

Low-level XMLRPC driver: Airald Hapairai, David Malcolm, Will Woods, Bill Peck, Chenxiong Qi, Tang Chaobin, Yuguang Wang and Xuqing Kuang.

As of November 2017 this module has been merged with Kiwi TCMS, an independent fork of the original Nitrate project. The codebase in this repository is developed independently of the original and may not be backwards compatible!

Release History

Release History

This version
History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tcms-api-1.5.0.tar.gz (40.2 kB) Copy SHA256 Checksum SHA256 Source Jan 2, 2018

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting