Skip to content

magicjohnson/targetprocess-client

 
 

Repository files navigation

TargetProcess Client

Python library to help getting data from TargetProcess API

Pypi Travis CI Codecov Code issues

Getting the code

The code is hosted at https://github.com/magicjohnson/targetprocess-client

Check out the latest development version with:

$ git clone git://github.com/magicjohnson/targetprocess-client.git

Installing

You can install targetprocess-client using:

$ pip install targetprocess-client

or get the code and run install:

$ cd targetprocess-client
$ python setup.py install

Usage examples

Create client instance:

from targetprocess.api import TargetProcessAPIClient
from targetprocess.serializers import TargetProcessSerializer
tp = TargetProcessAPIClient(api_url='https://md5.tpondemand.com/api/v1/', user='user', password='pass')

Get collection of UserStories:

stories_json = tp.get_stories(take=5, include="[Id,Name,CreateDate]")
stories = TargetProcessSerializer.deserialize(stories_json)

Get UserStory item

story_json = tp.get_story(360, include="[Id,Name,CreateDate]")
story = TargetProcessSerializer.deserialize(story_json)

Update item

data = {'Name': 'New name'}
tp.update_story(360, data)

Request "unregistered" collection (that client doesn't have predefined methods for)

tp.get_collection(collection="Epics", take=2)
tp.get_resource(collection="Epics", entity_id=427)
tp.update_resource(collection="Epics", entity_id=427, data={'Name': 'New Epic name'})

About

Python library to help getting data from TargetProcess API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 95.5%
  • Makefile 4.5%