pyznuny 0.0.5__py3-none-any.whl → 0.0.6__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,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyznuny
3
+ Version: 0.0.6
4
+ Summary: A Python client for interacting with the Znuny ticketing system API.
5
+ Author-email: Junior Rosa <jr.dasrosas@gmail.com>, Pablo Gascon <pablogasconiel445@gmail.com>
6
+ Project-URL: Homepage, https://github.com/Junior-Rosa/py-znuny
7
+ Project-URL: Repository, https://github.com/Junior-Rosa/py-znuny
8
+ Project-URL: Issues, https://github.com/Junior-Rosa/py-znuny/issues
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: httpx>=0.28.1
24
+ Requires-Dist: pydantic>=2.12.5
25
+ Dynamic: license-file
26
+
27
+ # pyznuny
28
+
29
+ A Python client for interacting with the Znuny ticketing system API.
30
+
31
+ ## Features
32
+
33
+ - Simple, typed client built on httpx
34
+ - Ticket create, update, and get routes
35
+ - Easy custom endpoint configuration
36
+
37
+ ## Installation
38
+
39
+ ```console
40
+ pip install pyznuny
41
+ ```
42
+
43
+ Or with uv:
44
+
45
+ ```console
46
+ uv add pyznuny
47
+ ```
48
+
49
+ ## Quick start
50
+
51
+ Create a client and authenticate using environment variables.
52
+
53
+ ```python
54
+ from pyznuny import TicketClient
55
+ from dotenv import load_dotenv
56
+ import os
57
+
58
+ load_dotenv()
59
+
60
+ client = TicketClient(
61
+ base_url=os.getenv("HOST"),
62
+ username=os.getenv("USER_LOGIN"),
63
+ password=os.getenv("PASSWORD"),
64
+ )
65
+ ```
66
+
67
+ Example `.env`:
68
+
69
+ ```ini
70
+ HOST=https://your-znuny-instance.com
71
+ USER_LOGIN=your-username
72
+ PASSWORD=your-password
73
+ ```
74
+
75
+ ## Usage examples
76
+
77
+ ### Create a ticket
78
+
79
+ ```python
80
+ from pyznuny.ticket.models import (
81
+ TicketCreateArticle,
82
+ TicketCreatePayload,
83
+ TicketCreateTicket,
84
+ )
85
+
86
+ payload = TicketCreatePayload(
87
+ Ticket=TicketCreateTicket(
88
+ Title="Ticket Title",
89
+ Queue="Ticket queue",
90
+ State="Ticket state",
91
+ Priority="Ticket priority",
92
+ CustomerUser="customer@example.com",
93
+ ),
94
+ Article=TicketCreateArticle(
95
+ Subject="Ticket subject",
96
+ Body="Ticket body...",
97
+ ContentType="text/plain; charset=utf-8",
98
+ From_="customer@example.com",
99
+ ),
100
+ )
101
+
102
+ response = client.ticket.create(payload=payload)
103
+ print(response.json())
104
+ ```
105
+
106
+ ### Get a ticket by ID
107
+
108
+ ```python
109
+ # default endpoint is GET /Ticket/{ticket_id}
110
+ response = client.ticket.get(ticket_id=1234)
111
+ print(response.json())
112
+ ```
113
+
114
+ ### Update a ticket
115
+
116
+ ```python
117
+ response = client.ticket.update(
118
+ ticket_id=1234,
119
+ Ticket={"State": "open"},
120
+ )
121
+ print(response.json())
122
+ ```
123
+
124
+ ### Customize endpoints
125
+
126
+ If your Znuny instance uses different paths, set them with the endpoint setter.
127
+
128
+ ```python
129
+ # Example: custom ticket get endpoint and identifier
130
+ client.set_endpoint.ticket_get(endpoint="Tickets/{id}", identifier="id")
131
+
132
+ response = client.ticket.get(ticket_id=1234)
133
+ ```
134
+
135
+ ## Notes
136
+
137
+ - When `username` and `password` are provided, the client logs in and stores
138
+ `session_id` automatically.
139
+ - You can pass a pre-configured `httpx.Client` via `client=...` if needed.
140
+
141
+ ## License
142
+
143
+ MIT
@@ -5,7 +5,8 @@ pyznuny/ticket/endpoints.py,sha256=ArLl_BnUnZAQaWOA-T9EnTQHF1vl1XUG2kCgxlzr7vc,4
5
5
  pyznuny/ticket/exceptions.py,sha256=0pK5I0TjF_yR19eUWITGd0DryG1BrD_3ggA1YXbmPxI,563
6
6
  pyznuny/ticket/models.py,sha256=oLn3asm3cDvRvi4LfR5HOKPsyP7tG-y7d7stD-QnNjc,4691
7
7
  pyznuny/ticket/routes.py,sha256=54cr08Z2NM9JwWCkY47E1Kj94Uen9d1PJXrJ24mb2nM,2514
8
- pyznuny-0.0.5.dist-info/METADATA,sha256=BY475mSyPt3cmku59n9QoKI5eI42Oe6GkFa8-v6V37Q,1058
9
- pyznuny-0.0.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
10
- pyznuny-0.0.5.dist-info/top_level.txt,sha256=ki9uLRbo2oQCeiEaaYUcnYMj1mD_dkIhQroMCdJJXmk,8
11
- pyznuny-0.0.5.dist-info/RECORD,,
8
+ pyznuny-0.0.6.dist-info/licenses/LICENSE,sha256=u46khy_M-afxT4hYts7ZKb557BdvpkgoCnqTd0YCiE8,1068
9
+ pyznuny-0.0.6.dist-info/METADATA,sha256=6LlJydC7RuHbJSs1EtfnVmtOYg-tSKGLnLQGo60sK0U,3313
10
+ pyznuny-0.0.6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
11
+ pyznuny-0.0.6.dist-info/top_level.txt,sha256=ki9uLRbo2oQCeiEaaYUcnYMj1mD_dkIhQroMCdJJXmk,8
12
+ pyznuny-0.0.6.dist-info/RECORD,,
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Junior Rosa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,23 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pyznuny
3
- Version: 0.0.5
4
- Summary: A Python client for interacting with the Znuny ticketing system API.
5
- Author-email: Junior Rosa <jr.dasrosas@gmail.com>, Pablo Gascon <pablogasconiel445@gmail.com>
6
- Project-URL: Homepage, https://github.com/Junior-Rosa/py-znuny
7
- Project-URL: Repository, https://github.com/Junior-Rosa/py-znuny
8
- Project-URL: Issues, https://github.com/Junior-Rosa/py-znuny/issues
9
- Classifier: Development Status :: 3 - Alpha
10
- Classifier: Intended Audience :: Developers
11
- Classifier: Operating System :: OS Independent
12
- Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3 :: Only
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Programming Language :: Python :: 3.11
17
- Classifier: Programming Language :: Python :: 3.12
18
- Classifier: Programming Language :: Python :: 3.13
19
- Classifier: Typing :: Typed
20
- Requires-Python: >=3.10
21
- Description-Content-Type: text/markdown
22
- Requires-Dist: httpx>=0.28.1
23
- Requires-Dist: pydantic>=2.12.5