Coder Social home page Coder Social logo

pyteamcity's Introduction

PyTeamCity

Latest Version Travis CI Build Status AppVeyor Build Status Coveralls Coverage Status

Python interface to the REST API of TeamCity

Installation

pip install pyteamcity

New API work-in-progress

Note that I am working on a new API currently called pyteamcity.future (initially added in #37).

Goal here is to create a brand new API that is much more flexible and to have nicer code that is easier to work with. The old code encourages adding a zillion methods for different ways of filtering. The new code has an API with a smaller number of methods that are more consistent and more flexible in terms of filtering. It is modeled after the Django ORM API.

There's no formal docs for this API yet, but you should be able to figure out how to use it by looking at the unit tests.

I am probably not going to merge PRs that add things to the old API, because I see the new API as the future. I of course am very interested in PRs that add things to the new API!

Examples

Connect to server

from pyteamcity 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 pyteamcity import TeamCity

# Initialises with environment variables: TEAMCITY_{USER,PASSWORD,HOST,PORT}
tc = TeamCity()

Getting data

tc.get_projects()
tc.get_project_by_project_id('MyProject')
tc.get_all_users()
tc.get_user_by_username('codyw')
tc.get_all_vcs_roots()
tc.get_all_build_types()
tc.get_changes_by_build_id(73450)
tc.get_build_statistics_by_build_id(73450)
tc.get_build_tags_by_build_id(73450)
tc.get_all_changes()
tc.get_change_by_change_id(16884)
tc.get_all_builds(start=0, count=3)
tc.get_build_by_build_id(73450)
tc.get_server_info()
tc.get_agents()
tc.get_all_plugins()

You can also look at sample.py or test_legacy.py

Acknowledgements

This is a heavily-modified fork of https://github.com/yotamoron/teamcity-python-rest-client so many thanks are due to Yotam Oron

pyteamcity's People

Contributors

msabramo avatar gvalkov avatar yotamoron avatar baopham avatar na1s avatar zacharya19 avatar aconrad avatar throwable-one avatar ozkatz avatar shekeen avatar simonasr avatar peterdemin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.