Pytc3 [WIP]
This is not production Ready yet.
Python interface to the REST API of TeamCity
Installation
pip install pytc3
Examples
Connect to server
from pytc3 import TeamCity
# This initialises the Client with the settings passed. <port> has to be an integer.
tc = TeamCity('account', 'password', 'server', <port>)
or specify no parameters and it will read settings from environment variables:
TEAMCITY_USER
TEAMCITY_PASSWORD
TEAMCITY_HOST
-
TEAMCITY_PORT
(Defaults to 80 if not set)
from pytc3 import TeamCity
# Initialises with environment variables: TEAMCITY_{USER,PASSWORD,HOST,PORT}
tc = TeamCity()
Getting data
You can also look at sample.py
Acknowledgements
This is a heavily-modified fork of https://github.com/SurveyMonkey/pyteamcity so many thanks are due to SurveyMonkey