Skip to content

Asyncio Yandex Tracker API client

License

Notifications You must be signed in to change notification settings

Olegt0rr/YaTracker

Repository files navigation

YaTracker

Asyncio Yandex Tracker API client

Python Code linter: ruff Checked with mypy Linters

Documentation: https://olegt0rr.github.io/YaTracker/

API docs: https://cloud.yandex.com/en/docs/tracker/about-api

Attention!

  • 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.

How to install

pip install yatracker

How to use

from yatracker import YaTracker

tracker = YaTracker(org_id=..., token=...)

async def foo():
    # create issue
    issue = await tracker.create_issue('New Issue', 'KEY')

    # get issue
    issue = await tracker.get_issue('KEY-1')

    # update issue (just pass kwargs)
    issue = await tracker.edit_issue('KEY-1', description='Hello World')

    # get transitions:
    transitions = await issue.get_transitions()

    # execute transition
    transition = transitions[0]
    await transition.execute()
# don't forget to close tracker on app shutdown
async def on_shutdown():
    await tracker.close()