teamcity
1.0.9
dohq-teamcity เป็นแพ็คเกจ Python ที่ให้การเข้าถึง Jetbrains TeamCity Server API ห้องสมุดนี้รองรับวิธีการของ TeamCity API ทั้งหมดหากคุณไม่พบบางส่วน - สร้างปัญหาโปรด
# Latest release
pip install dohq-teamcity
# Develop branch
git clone https://github.com/devopshq/teamcity
cd teamcity
python setup.py install
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 ()ดูตัวอย่างเพิ่มเติมและเอกสารเต็มรูปแบบในหน้า: https://devopshq.github.io/teamcity
dohq_teamcity/version.py