https://github.com/devopshq/teamcity
dohq-teamcity is a Python package providing access to the JetBrains TeamCity server API.
https://github.com/devopshq/teamcity
devopshq dohq-teamcity jetbrains python python-library teamcity teamcity-api
Last synced: 2 months ago
JSON representation
dohq-teamcity is a Python package providing access to the JetBrains TeamCity server API.
- Host: GitHub
- URL: https://github.com/devopshq/teamcity
- Owner: devopshq
- License: mit
- Created: 2018-10-16T05:42:15.000Z (almost 7 years ago)
- Default Branch: develop
- Last Pushed: 2025-06-09T03:05:38.000Z (4 months ago)
- Last Synced: 2025-06-09T04:20:01.273Z (4 months ago)
- Topics: devopshq, dohq-teamcity, jetbrains, python, python-library, teamcity, teamcity-api
- Language: Python
- Homepage: https://devopshq.github.io/teamcity/
- Size: 7.46 MB
- Stars: 32
- Watchers: 6
- Forks: 12
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dohq-teamcity
[](https://devopshq.github.io/teamcity/)
[](https://travis-ci.org/devopshq/teamcity)
[](https://pypi.python.org/pypi/dohq-teamcity)
[](https://github.com/devopshq/teamcity/blob/master/LICENSE)`dohq-teamcity` is a Python package providing access to the JetBrains TeamCity server API. This library support ALL [TeamCity API](https://confluence.jetbrains.com/display/TCD10/REST+API) methods, if you don't find some - create issue, please.
## Installation
```
# Latest release
pip install dohq-teamcity# Develop branch
git clone https://github.com/devopshq/teamcity
cd teamcity
python setup.py install
```## Usage
```python
from dohq_teamcity import TeamCity# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))# list all the projects
projects = tc.projects.get_projects()
# OR
# projects = tc.project_api.get_projects()
for project in projects:
print(project)# get the group with name = groupname
group = tc.group.get('name:groupname')
print(group)# get the user with name = username
user = tc.user.get('username:devopshq')
print(user)# create a new user and delete
from dohq_teamcity import User
new_user = User(name='New user', username='new_user')
new_user = tc.users.create_user(body=new_user)
new_user.delete()# other way - create object, connect with exist instance and load it
import dohq_teamcity
bt = dohq_teamcity.BuildType(id='MyBuildTypeId', teamcity=tc)
bt = bt.read()
```## What next?
See more examples and full documantation on page: https://devopshq.github.io/teamcity## How to release?
1. Bump version in `dohq_teamcity/version.py`
2. Merge changes to **master** branch
3. Create Github Release