Giter Site home page Giter Site logo

yatracker's Introduction

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()

yatracker's People

Contributors

danfimov avatar dependabot[bot] avatar olegt0rr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

danfimov max92110

yatracker's Issues

Custom Issue fields support

I have some custom fields in Issue and should use it via model.
We should make ability to pass arguments with custom Issue class to fill it with data from API

Change field `encode_name` inspection

          `msgspec.inspect.type_info` is one way, but it's a bit overkill for this use case. And `__struct_encode_fields__` is technically non-public (and may be removed in the future). The best way to get this information is to use `msgspec.struct.fields` ([docs](https://jcristharif.com/msgspec/api.html#msgspec.structs.fields)). You're looking for the `encode_name` attribute on `FieldInfo` in the result:
In [3]: class Example(msgspec.Struct):
   ...:     user_id: int = msgspec.field(name="userId")
   ...: 

In [4]: msgspec.structs.fields(Example)
Out[4]: (FieldInfo(name='user_id', encode_name='userId', type=<class 'int'>, default=NODEFAULT, default_factory=NODEFAULT),)

Originally posted by @jcrist in jcrist/msgspec#672 (comment)

Transition execute wrong url

Tansition uses self url + _execute postfix.
Client also adds version prefix.

Requested url:

/v2https://api.tracker.yandex.net/v2/issues/TEST-1/transitions/start_progress/_execute was not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.