Yandex Tracker Client (or Yet Another Tracker Client)
Async Yandex Tracker Client based on aiohttp and pydantic
API docs: https://cloud.yandex.com/en/docs/tracker/about-api
Installation
pip install ya_tracker_client
or
poetry add ya_tracker_client
Usage
import os
from asyncio import run
from dotenv import load_dotenv
from ya_tracker_client import YaTrackerClient
load_dotenv()
API_TOKEN = os.getenv("API_TOKEN")
API_ORGANISATION_ID = os.getenv("API_ORGANISATION_ID")
async def main() -> None:
client = YaTrackerClient(
organisation_id=API_ORGANISATION_ID,
oauth_token=API_TOKEN,
)
new_issue = await client.create_issue('New issue', 'TRACKER-QUEUE')
issue = await client.get_issue('KEY-1')
issue = await client.edit_issue('KEY-1', description='Hello World')
await client.stop()
if __name__ == "__main__":
run(main())
Explanations about naming
- All
self
properties renamed to url
cause it's incompatible with Python; - All
camelCase
properties renamed to pythonic_case
; - All datetime values converted to python's
datetime.datetime
objects; - Methods named by author, cause Yandex API has no clear method names.
Current library capabilities
- Working with queues
- Getting information about issues, priorities and transitions
- Working with issue relationships
- Getting user information
More info about work status here: https://github.com/danfimov/ya_tracker_client/milestone/1