YouTrack SDK
Project description
YouTrack REST API Client
A client library for accessing YouTrack REST API.
This is a fork of moneymeets/youtrack-sdk with several enhancements.
Key Changes from Original
This fork includes the following improvements over the original repository:
- AsyncClient Implementation: Full async/await support with
AsyncClientfor non-blocking I/O operations - Project Custom Fields API: New
get_project_custom_fields()method to retrieve custom field definitions for projects - Migrated to UV: Switched from Poetry to UV for dependency management
- Enhanced Testing: Migrated test suite from unittest to Pytest with async test support
- Modern Python: Updated to require Python 3.13+ with improved type hints and linting
- Improved Code Quality: Enhanced linting with Ruff and type checking with Pyright
Usage
Synchronous Client
from datetime import date
from youtrack_sdk import Client
from youtrack_sdk.entities import (
DateIssueCustomField,
EnumBundleElement,
Issue,
Tag,
Project,
SingleEnumIssueCustomField,
SingleUserIssueCustomField,
StateBundleElement,
StateIssueCustomField,
User,
)
with Client(base_url="https://dummy.myjetbrains.com/youtrack", token="dummy") as client:
result = client.create_issue(
issue=Issue(
project=Project(id="0-0"),
summary="Created from YouTrack SDK",
description="Description **text**.",
tags=[
Tag(id="6-0"),
],
custom_fields=[
StateIssueCustomField(
name="State",
value=StateBundleElement(
name="In Progress",
),
),
SingleUserIssueCustomField(
name="Assignee",
value=User(
ring_id="00000000-a31c-4174-bb27-abd3387df67a",
),
),
SingleEnumIssueCustomField(
name="Type",
value=EnumBundleElement(
name="Bug",
),
),
DateIssueCustomField(
name="Due Date",
value=date(2005, 12, 31),
),
],
),
)
Async Client
import asyncio
from youtrack_sdk import AsyncClient
from youtrack_sdk.entities import Project
async def main():
async with AsyncClient(base_url="https://dummy.myjetbrains.com/youtrack", token="dummy") as client:
projects = await client.get_projects()
for project in projects:
print(f"Project: {project.name}")
asyncio.run(main())
Fetching Project Custom Fields
from youtrack_sdk import Client
with Client(base_url="https://dummy.myjetbrains.com/youtrack", token="dummy") as client:
custom_fields = client.get_project_custom_fields(project_id="0-0")
for field in custom_fields:
print(f"Field: {field.field.name}, Type: {type(field).__name__}")
See examples/list_project_custom_fields.py for a complete example.
Note
- You should prefer to use internal entity IDs everywhere. Some methods accept readable issue IDs (e.g. HD-99) but it's not supported everywhere.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file youtrack_python-0.1.3.tar.gz.
File metadata
- Download URL: youtrack_python-0.1.3.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a480e1bc8f0059dcf208c726107227c2a6e6d6dd589f1a1d4661e89b72ef36df
|
|
| MD5 |
a99339a31afd0f673876515692b16dc3
|
|
| BLAKE2b-256 |
e66dad0bd320727d142eee9fe628d4ea90778f085eda6ca094150667f3a15e42
|
Provenance
The following attestation bundles were made for youtrack_python-0.1.3.tar.gz:
Publisher:
release.yml on ninjaneers-team/youtrack-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
youtrack_python-0.1.3.tar.gz -
Subject digest:
a480e1bc8f0059dcf208c726107227c2a6e6d6dd589f1a1d4661e89b72ef36df - Sigstore transparency entry: 1095938750
- Sigstore integration time:
-
Permalink:
ninjaneers-team/youtrack-sdk@ee6b34897cc3c09266ddb740cffd981aa97f9ba2 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/ninjaneers-team
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ee6b34897cc3c09266ddb740cffd981aa97f9ba2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file youtrack_python-0.1.3-py3-none-any.whl.
File metadata
- Download URL: youtrack_python-0.1.3-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39db2bd8d308ceb9140444839726bc64bc0ba73e283f9268ce3fee4eee654b23
|
|
| MD5 |
60e7fdf3ba29ea56ca4fea18160d027f
|
|
| BLAKE2b-256 |
6740355693210c74ec3b707c4b5289e420c1c6eb7e1d1146a5a5055de94b6543
|
Provenance
The following attestation bundles were made for youtrack_python-0.1.3-py3-none-any.whl:
Publisher:
release.yml on ninjaneers-team/youtrack-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
youtrack_python-0.1.3-py3-none-any.whl -
Subject digest:
39db2bd8d308ceb9140444839726bc64bc0ba73e283f9268ce3fee4eee654b23 - Sigstore transparency entry: 1095938751
- Sigstore integration time:
-
Permalink:
ninjaneers-team/youtrack-sdk@ee6b34897cc3c09266ddb740cffd981aa97f9ba2 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/ninjaneers-team
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ee6b34897cc3c09266ddb740cffd981aa97f9ba2 -
Trigger Event:
release
-
Statement type: