Microsoft Team Foundation Server Python Library is a Microsoft TFS API Python client that can work with Microsoft TFS workitems
Project description
PyTfsClient library (TFS API Python client)
Microsoft Team Foundation Server Python Library is a Microsoft TFS API Python client that can work with Microsoft TFS workitems.
Installing
Feel free to use command "pip install pytfsclient"
Basic usage
- Install pytfsclient package
- Import package
import pytfsclient
from pytfsclient.tfs_client_factory import TfsClientFactory
- Create and configure Base TFS Client
base_client = TfsClientFactory.create('https://tfs-server/tfs/', 'DefaultCollection/MyProject')
### IF authentificate with PAT
base_client.authentificate_with_pat('<personal access token>')
### OR with user name and password
base_client.authentificate_with_password('username', 'userpassword')
-
Get facade your need
3.1 If you want to manage workitems
client = TfsClientFactory.get_workitem_client(base_client)
3.2 If you want to manage projects, teams, team members
client = TfsClientFactory.get_project_client(base_client)
-
Manage TFS items
4.1 Managing workitems
wi = client.get_single_workitem(10500) print('Item: Id={}, Title={}, State={}'.format(wi.id, wi.title, wi['System.State'])) wi['Custom.Field'] = 'Value' wi.update() print('Item custom field: {}'.format(wi['Custom.Field'])) workitems = client.get_workitems([1, 2, 3]) for wi in workitems: print('Item: id={}, Title={}'.format(wi.id, wi.title))
Docs
TODO:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytfsclient-0.9.4.tar.gz
(14.0 kB
view hashes)
Built Distribution
Close
Hashes for pytfsclient-0.9.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0596c2a4068cdfe8d48defcd503f940e46170e4d0746321f63a7fda3fdb45d2 |
|
MD5 | 4fb502534a32923cc7a93f54735cc0cb |
|
BLAKE2b-256 | fce5e16ecff73e6410847c06f6db85dfe81118ce2934cc820e9fb8219b619ae1 |