ya_tracker_client


Nameya_tracker_client JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/danfimov/ya_tracker_client/
SummaryAsync Yandex Tracker Client
upload_time2023-10-07 14:36:08
maintainerДмитрий Анфимов
docs_urlNone
authorДмитрий Анфимов
requires_python>=3.10,<4.0
licenseMIT
keywords yandex tracker api async
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Yandex Tracker Client (or Yet Another Tracker Client)

Async Yandex Tracker Client based on aiohttp and pydantic

[![Python](https://img.shields.io/badge/python-^3.10-blue)](https://www.python.org/)
[![Code linter: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
[![Linters](https://github.com/danfimov/ya_tracker_client/actions/workflows/code-check.yml/badge.svg)](https://github.com/danfimov/ya_tracker_client/actions/workflows/code-check.yml)

---

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

## Installation

```shell
pip install ya_tracker_client
```

or 

```shell
poetry add ya_tracker_client
```


## Usage

```python
import os
from asyncio import run

from dotenv import load_dotenv

from ya_tracker_client import YaTrackerClient


load_dotenv()
# from registered application at Yandex OAuth - https://oauth.yandex.ru/
API_TOKEN = os.getenv("API_TOKEN")
# from admin panel at Yandex Tracker - https://tracker.yandex.ru/admin/orgs
API_ORGANISATION_ID = os.getenv("API_ORGANISATION_ID")


async def main() -> None:
    # init client
    client = YaTrackerClient(
        organisation_id=API_ORGANISATION_ID,
        oauth_token=API_TOKEN,
    )
    
    # create issue
    new_issue = await client.create_issue('New issue', 'TRACKER-QUEUE')
    
     # get issue
    issue = await client.get_issue('KEY-1')
    
    # update issue (just pass kwargs)
    issue = await client.edit_issue('KEY-1', description='Hello World')
    
    # don't forget to close tracker on app shutdown
    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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/danfimov/ya_tracker_client/",
    "name": "ya_tracker_client",
    "maintainer": "\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0410\u043d\u0444\u0438\u043c\u043e\u0432",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "work@danfimov.ru",
    "keywords": "Yandex,Tracker,API,async",
    "author": "\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0410\u043d\u0444\u0438\u043c\u043e\u0432",
    "author_email": "work@danfimov.ru",
    "download_url": "https://files.pythonhosted.org/packages/b5/88/4ec1739ee8b27e1be70662f80f73f677026fba2468f3bb877a9460ff42c1/ya_tracker_client-0.0.3.tar.gz",
    "platform": null,
    "description": "# Yandex Tracker Client (or Yet Another Tracker Client)\n\nAsync Yandex Tracker Client based on aiohttp and pydantic\n\n[![Python](https://img.shields.io/badge/python-^3.10-blue)](https://www.python.org/)\n[![Code linter: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)\n[![Linters](https://github.com/danfimov/ya_tracker_client/actions/workflows/code-check.yml/badge.svg)](https://github.com/danfimov/ya_tracker_client/actions/workflows/code-check.yml)\n\n---\n\nAPI docs: https://cloud.yandex.com/en/docs/tracker/about-api\n\n## Installation\n\n```shell\npip install ya_tracker_client\n```\n\nor \n\n```shell\npoetry add ya_tracker_client\n```\n\n\n## Usage\n\n```python\nimport os\nfrom asyncio import run\n\nfrom dotenv import load_dotenv\n\nfrom ya_tracker_client import YaTrackerClient\n\n\nload_dotenv()\n# from registered application at Yandex OAuth - https://oauth.yandex.ru/\nAPI_TOKEN = os.getenv(\"API_TOKEN\")\n# from admin panel at Yandex Tracker - https://tracker.yandex.ru/admin/orgs\nAPI_ORGANISATION_ID = os.getenv(\"API_ORGANISATION_ID\")\n\n\nasync def main() -> None:\n    # init client\n    client = YaTrackerClient(\n        organisation_id=API_ORGANISATION_ID,\n        oauth_token=API_TOKEN,\n    )\n    \n    # create issue\n    new_issue = await client.create_issue('New issue', 'TRACKER-QUEUE')\n    \n     # get issue\n    issue = await client.get_issue('KEY-1')\n    \n    # update issue (just pass kwargs)\n    issue = await client.edit_issue('KEY-1', description='Hello World')\n    \n    # don't forget to close tracker on app shutdown\n    await client.stop()\n\n\nif __name__ == \"__main__\":\n    run(main())\n```\n\n\n## Explanations about naming\n\n- All `self` properties renamed to `url` cause it's incompatible with Python;\n- All `camelCase` properties renamed to `pythonic_case`;\n- All datetime values converted to python's `datetime.datetime` objects;\n- Methods named by author, cause Yandex API has no clear method names.\n\n## Current library capabilities\n\n- Working with queues\n- Getting information about issues, priorities and transitions\n- Working with issue relationships\n- Getting user information\n\nMore info about work status here: https://github.com/danfimov/ya_tracker_client/milestone/1\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Async Yandex Tracker Client",
    "version": "0.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/danfimov/ya_tracker_client/issues",
        "Homepage": "https://github.com/danfimov/ya_tracker_client/",
        "Repository": "https://github.com/danfimov/ya_tracker_client/"
    },
    "split_keywords": [
        "yandex",
        "tracker",
        "api",
        "async"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "78cb97b292c9e292a227a28d034201fe735549c9cf151f4a083df7221e8a69b9",
                "md5": "2bf885ed30f20c0b1eaae411df54c77a",
                "sha256": "d9711681b9cb62eb3da697c778df9723ac90600ba187f4d3320136ddd5fcb759"
            },
            "downloads": -1,
            "filename": "ya_tracker_client-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2bf885ed30f20c0b1eaae411df54c77a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 41383,
            "upload_time": "2023-10-07T14:36:06",
            "upload_time_iso_8601": "2023-10-07T14:36:06.524464Z",
            "url": "https://files.pythonhosted.org/packages/78/cb/97b292c9e292a227a28d034201fe735549c9cf151f4a083df7221e8a69b9/ya_tracker_client-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b5884ec1739ee8b27e1be70662f80f73f677026fba2468f3bb877a9460ff42c1",
                "md5": "02e257f7b40a94e4b6fb158b46c6acb1",
                "sha256": "7a60dc60a432b0251e496ea6918b4935fbd2d3c6422586590bb354c02fabb759"
            },
            "downloads": -1,
            "filename": "ya_tracker_client-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "02e257f7b40a94e4b6fb158b46c6acb1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 21215,
            "upload_time": "2023-10-07T14:36:08",
            "upload_time_iso_8601": "2023-10-07T14:36:08.629514Z",
            "url": "https://files.pythonhosted.org/packages/b5/88/4ec1739ee8b27e1be70662f80f73f677026fba2468f3bb877a9460ff42c1/ya_tracker_client-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-07 14:36:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "danfimov",
    "github_project": "ya_tracker_client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ya_tracker_client"
}
        
Elapsed time: 0.13864s