youtrack-python 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,149 @@
1
+ Metadata-Version: 2.4
2
+ Name: youtrack-python
3
+ Version: 0.1.1
4
+ Summary: YouTrack SDK
5
+ Project-URL: Repository, https://github.com/ninjaneers-team/youtrack-sdk
6
+ Project-URL: Homepage, https://github.com/moneymeets/youtrack-sdk
7
+ Author-email: moneymeets <service@moneymeets.com>, Michael Gerhold <michael.gerhold@ninjaneers.de>
8
+ License: MIT License
9
+
10
+ Copyright (c) 2023-2024 moneymeets GmbH
11
+ Copyright (c) 2026 Ninjaneers GmbH
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ License-File: LICENSE
31
+ Keywords: sdk,youtrack
32
+ Classifier: Development Status :: 5 - Production/Stable
33
+ Classifier: Intended Audience :: Developers
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.13
37
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
38
+ Requires-Python: >=3.13
39
+ Requires-Dist: httpx>=0.28.1
40
+ Requires-Dist: pydantic>=2.12.5
41
+ Description-Content-Type: text/markdown
42
+
43
+ # YouTrack REST API Client
44
+
45
+ A client library for accessing YouTrack REST API.
46
+
47
+ This is a fork of [moneymeets/youtrack-sdk](https://github.com/moneymeets/youtrack-sdk) with several enhancements.
48
+
49
+ ## Key Changes from Original
50
+
51
+ This fork includes the following improvements over the original repository:
52
+
53
+ - **AsyncClient Implementation**: Full async/await support with `AsyncClient` for non-blocking I/O operations
54
+ - **Project Custom Fields API**: New `get_project_custom_fields()` method to retrieve custom field definitions for projects
55
+ - **Migrated to UV**: Switched from Poetry to UV for dependency management
56
+ - **Enhanced Testing**: Migrated test suite from unittest to Pytest with async test support
57
+ - **Modern Python**: Updated to require Python 3.13+ with improved type hints and linting
58
+ - **Improved Code Quality**: Enhanced linting with Ruff and type checking with Pyright
59
+
60
+ ## Usage
61
+
62
+ ### Synchronous Client
63
+
64
+ ```python
65
+ from datetime import date
66
+ from youtrack_sdk import Client
67
+ from youtrack_sdk.entities import (
68
+ DateIssueCustomField,
69
+ EnumBundleElement,
70
+ Issue,
71
+ Tag,
72
+ Project,
73
+ SingleEnumIssueCustomField,
74
+ SingleUserIssueCustomField,
75
+ StateBundleElement,
76
+ StateIssueCustomField,
77
+ User,
78
+ )
79
+
80
+ with Client(base_url="https://dummy.myjetbrains.com/youtrack", token="dummy") as client:
81
+ result = client.create_issue(
82
+ issue=Issue(
83
+ project=Project(id="0-0"),
84
+ summary="Created from YouTrack SDK",
85
+ description="Description **text**.",
86
+ tags=[
87
+ Tag(id="6-0"),
88
+ ],
89
+ custom_fields=[
90
+ StateIssueCustomField(
91
+ name="State",
92
+ value=StateBundleElement(
93
+ name="In Progress",
94
+ ),
95
+ ),
96
+ SingleUserIssueCustomField(
97
+ name="Assignee",
98
+ value=User(
99
+ ring_id="00000000-a31c-4174-bb27-abd3387df67a",
100
+ ),
101
+ ),
102
+ SingleEnumIssueCustomField(
103
+ name="Type",
104
+ value=EnumBundleElement(
105
+ name="Bug",
106
+ ),
107
+ ),
108
+ DateIssueCustomField(
109
+ name="Due Date",
110
+ value=date(2005, 12, 31),
111
+ ),
112
+ ],
113
+ ),
114
+ )
115
+ ```
116
+
117
+ ### Async Client
118
+
119
+ ```python
120
+ import asyncio
121
+ from youtrack_sdk import AsyncClient
122
+ from youtrack_sdk.entities import Project
123
+
124
+ async def main():
125
+ async with AsyncClient(base_url="https://dummy.myjetbrains.com/youtrack", token="dummy") as client:
126
+ projects = await client.get_projects()
127
+ for project in projects:
128
+ print(f"Project: {project.name}")
129
+
130
+ asyncio.run(main())
131
+ ```
132
+
133
+ ### Fetching Project Custom Fields
134
+
135
+ ```python
136
+ from youtrack_sdk import Client
137
+
138
+ with Client(base_url="https://dummy.myjetbrains.com/youtrack", token="dummy") as client:
139
+ custom_fields = client.get_project_custom_fields(project_id="0-0")
140
+
141
+ for field in custom_fields:
142
+ print(f"Field: {field.field.name}, Type: {type(field).__name__}")
143
+ ```
144
+
145
+ See [examples/list_project_custom_fields.py](examples/list_project_custom_fields.py) for a complete example.
146
+
147
+ ## Note
148
+
149
+ - 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.
@@ -0,0 +1,4 @@
1
+ youtrack_python-0.1.1.dist-info/METADATA,sha256=RKPhkqrBrwRnVfGeg9lhNgZW7TRPA_-F28Nq7bUPbMk,5527
2
+ youtrack_python-0.1.1.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
3
+ youtrack_python-0.1.1.dist-info/licenses/LICENSE,sha256=qAqQjth50VC0jPWY353NDzT2D76PVDYGf5COaiUpEnk,1112
4
+ youtrack_python-0.1.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2024 moneymeets GmbH
4
+ Copyright (c) 2026 Ninjaneers GmbH
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.