pyznuny 0.0.5__tar.gz → 0.0.7__tar.gz

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.
pyznuny-0.0.7/LICENSE ADDED
@@ -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.
pyznuny-0.0.7/PKG-INFO ADDED
@@ -0,0 +1,139 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyznuny
3
+ Version: 0.0.7
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
+ payload = {
81
+ "Ticket": {
82
+ "Title": "Ticket Title",
83
+ "Queue": "Ticket queue",
84
+ "State": "Ticket state",
85
+ "Priority": "Ticket priority",
86
+ "CustomerUser": "customer@example.com",
87
+ },
88
+ "Article": {
89
+ "Subject": "Ticket subject",
90
+ "Body": "Ticket body...",
91
+ "ContentType": "text/plain; charset=utf-8",
92
+ "From": "customer@example.com",
93
+ },
94
+ }
95
+
96
+ response = client.ticket.create(payload=payload)
97
+ print(response.json())
98
+ ```
99
+
100
+ ### Get a ticket by ID
101
+
102
+ ```python
103
+ # default endpoint is GET /Ticket/{ticket_id}
104
+ response = client.ticket.get(ticket_id=1234)
105
+ print(response.json())
106
+ ```
107
+
108
+ ### Update a ticket
109
+
110
+ ```python
111
+ response = client.ticket.update(
112
+ ticket_id=1234,
113
+ Ticket={"State": "open"},
114
+ )
115
+ print(response.json())
116
+ ```
117
+
118
+ ### Customize endpoints
119
+
120
+ If your Znuny instance uses different paths, set them with the endpoint setter.
121
+
122
+ ```python
123
+ # Example: custom ticket get endpoint and identifier
124
+ client.set_endpoint.ticket_get(endpoint="Tickets/{id}", identifier="id")
125
+
126
+ response = client.ticket.get(ticket_id=1234)
127
+ ```
128
+
129
+ ## Notes
130
+
131
+ - When `username` and `password` are provided, the client logs in and stores
132
+ `session_id` automatically.
133
+ - You can pass a pre-configured `httpx.Client` via `client=...` if needed.
134
+ - You can send payloads as plain dicts using the same attributes shown in the
135
+ examples.
136
+
137
+ ## License
138
+
139
+ MIT
@@ -0,0 +1,113 @@
1
+ # pyznuny
2
+
3
+ A Python client for interacting with the Znuny ticketing system API.
4
+
5
+ ## Features
6
+
7
+ - Simple, typed client built on httpx
8
+ - Ticket create, update, and get routes
9
+ - Easy custom endpoint configuration
10
+
11
+ ## Installation
12
+
13
+ ```console
14
+ pip install pyznuny
15
+ ```
16
+
17
+ Or with uv:
18
+
19
+ ```console
20
+ uv add pyznuny
21
+ ```
22
+
23
+ ## Quick start
24
+
25
+ Create a client and authenticate using environment variables.
26
+
27
+ ```python
28
+ from pyznuny import TicketClient
29
+ from dotenv import load_dotenv
30
+ import os
31
+
32
+ load_dotenv()
33
+
34
+ client = TicketClient(
35
+ base_url=os.getenv("HOST"),
36
+ username=os.getenv("USER_LOGIN"),
37
+ password=os.getenv("PASSWORD"),
38
+ )
39
+ ```
40
+
41
+ Example `.env`:
42
+
43
+ ```ini
44
+ HOST=https://your-znuny-instance.com
45
+ USER_LOGIN=your-username
46
+ PASSWORD=your-password
47
+ ```
48
+
49
+ ## Usage examples
50
+
51
+ ### Create a ticket
52
+
53
+ ```python
54
+ payload = {
55
+ "Ticket": {
56
+ "Title": "Ticket Title",
57
+ "Queue": "Ticket queue",
58
+ "State": "Ticket state",
59
+ "Priority": "Ticket priority",
60
+ "CustomerUser": "customer@example.com",
61
+ },
62
+ "Article": {
63
+ "Subject": "Ticket subject",
64
+ "Body": "Ticket body...",
65
+ "ContentType": "text/plain; charset=utf-8",
66
+ "From": "customer@example.com",
67
+ },
68
+ }
69
+
70
+ response = client.ticket.create(payload=payload)
71
+ print(response.json())
72
+ ```
73
+
74
+ ### Get a ticket by ID
75
+
76
+ ```python
77
+ # default endpoint is GET /Ticket/{ticket_id}
78
+ response = client.ticket.get(ticket_id=1234)
79
+ print(response.json())
80
+ ```
81
+
82
+ ### Update a ticket
83
+
84
+ ```python
85
+ response = client.ticket.update(
86
+ ticket_id=1234,
87
+ Ticket={"State": "open"},
88
+ )
89
+ print(response.json())
90
+ ```
91
+
92
+ ### Customize endpoints
93
+
94
+ If your Znuny instance uses different paths, set them with the endpoint setter.
95
+
96
+ ```python
97
+ # Example: custom ticket get endpoint and identifier
98
+ client.set_endpoint.ticket_get(endpoint="Tickets/{id}", identifier="id")
99
+
100
+ response = client.ticket.get(ticket_id=1234)
101
+ ```
102
+
103
+ ## Notes
104
+
105
+ - When `username` and `password` are provided, the client logs in and stores
106
+ `session_id` automatically.
107
+ - You can pass a pre-configured `httpx.Client` via `client=...` if needed.
108
+ - You can send payloads as plain dicts using the same attributes shown in the
109
+ examples.
110
+
111
+ ## License
112
+
113
+ MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyznuny"
3
- version = "0.0.5"
3
+ version = "0.0.7"
4
4
  description = "A Python client for interacting with the Znuny ticketing system API."
5
5
  authors = [
6
6
  { name = "Junior Rosa", email = "jr.dasrosas@gmail.com" },
@@ -0,0 +1,139 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyznuny
3
+ Version: 0.0.7
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
+ payload = {
81
+ "Ticket": {
82
+ "Title": "Ticket Title",
83
+ "Queue": "Ticket queue",
84
+ "State": "Ticket state",
85
+ "Priority": "Ticket priority",
86
+ "CustomerUser": "customer@example.com",
87
+ },
88
+ "Article": {
89
+ "Subject": "Ticket subject",
90
+ "Body": "Ticket body...",
91
+ "ContentType": "text/plain; charset=utf-8",
92
+ "From": "customer@example.com",
93
+ },
94
+ }
95
+
96
+ response = client.ticket.create(payload=payload)
97
+ print(response.json())
98
+ ```
99
+
100
+ ### Get a ticket by ID
101
+
102
+ ```python
103
+ # default endpoint is GET /Ticket/{ticket_id}
104
+ response = client.ticket.get(ticket_id=1234)
105
+ print(response.json())
106
+ ```
107
+
108
+ ### Update a ticket
109
+
110
+ ```python
111
+ response = client.ticket.update(
112
+ ticket_id=1234,
113
+ Ticket={"State": "open"},
114
+ )
115
+ print(response.json())
116
+ ```
117
+
118
+ ### Customize endpoints
119
+
120
+ If your Znuny instance uses different paths, set them with the endpoint setter.
121
+
122
+ ```python
123
+ # Example: custom ticket get endpoint and identifier
124
+ client.set_endpoint.ticket_get(endpoint="Tickets/{id}", identifier="id")
125
+
126
+ response = client.ticket.get(ticket_id=1234)
127
+ ```
128
+
129
+ ## Notes
130
+
131
+ - When `username` and `password` are provided, the client logs in and stores
132
+ `session_id` automatically.
133
+ - You can pass a pre-configured `httpx.Client` via `client=...` if needed.
134
+ - You can send payloads as plain dicts using the same attributes shown in the
135
+ examples.
136
+
137
+ ## License
138
+
139
+ MIT
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  README.md
2
3
  pyproject.toml
3
4
  src/pyznuny/__init__.py
pyznuny-0.0.5/PKG-INFO DELETED
@@ -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
pyznuny-0.0.5/README.md DELETED
File without changes
@@ -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
File without changes
File without changes
File without changes