easyvista-python-client 0.1.0__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.
- easyvista_python_client/__init__.py +74 -0
- easyvista_python_client/_async/__init__.py +13 -0
- easyvista_python_client/_async/_concurrency.py +78 -0
- easyvista_python_client/_async/_transport.py +266 -0
- easyvista_python_client/_async/client.py +790 -0
- easyvista_python_client/_fields.py +26 -0
- easyvista_python_client/_html.py +41 -0
- easyvista_python_client/_sync/__init__.py +13 -0
- easyvista_python_client/_sync/_concurrency.py +50 -0
- easyvista_python_client/_sync/_transport.py +266 -0
- easyvista_python_client/_sync/client.py +790 -0
- easyvista_python_client/_transport.py +29 -0
- easyvista_python_client/config.py +71 -0
- easyvista_python_client/context.py +116 -0
- easyvista_python_client/directory.py +53 -0
- easyvista_python_client/exceptions.py +53 -0
- easyvista_python_client/field_model.py +74 -0
- easyvista_python_client/filters.py +82 -0
- easyvista_python_client/models/__init__.py +1 -0
- easyvista_python_client/models/action.py +65 -0
- easyvista_python_client/models/asset.py +36 -0
- easyvista_python_client/models/common.py +78 -0
- easyvista_python_client/models/department.py +68 -0
- easyvista_python_client/models/document.py +32 -0
- easyvista_python_client/models/employee.py +67 -0
- easyvista_python_client/models/request.py +172 -0
- easyvista_python_client/pagination.py +84 -0
- easyvista_python_client/py.typed +0 -0
- easyvista_python_client/references.py +146 -0
- easyvista_python_client/reporting.py +143 -0
- easyvista_python_client/resources/__init__.py +1 -0
- easyvista_python_client/resources/actions.py +72 -0
- easyvista_python_client/resources/assets.py +47 -0
- easyvista_python_client/resources/departments.py +57 -0
- easyvista_python_client/resources/descriptor.py +99 -0
- easyvista_python_client/resources/documents.py +78 -0
- easyvista_python_client/resources/employees.py +57 -0
- easyvista_python_client/resources/requests.py +91 -0
- easyvista_python_client-0.1.0.dist-info/METADATA +178 -0
- easyvista_python_client-0.1.0.dist-info/RECORD +42 -0
- easyvista_python_client-0.1.0.dist-info/WHEEL +4 -0
- easyvista_python_client-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: easyvista-python-client
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Typed Python client for the EasyVista Service Manager REST API
|
|
5
|
+
Project-URL: Homepage, https://github.com/baraline/easyvista_python_client
|
|
6
|
+
Project-URL: Documentation, https://easyvista-python-client.readthedocs.io/en/latest/
|
|
7
|
+
Project-URL: Issues, https://github.com/baraline/easyvista_python_client/issues
|
|
8
|
+
Project-URL: Source, https://github.com/baraline/easyvista_python_client
|
|
9
|
+
Author: easyvista-python-client contributors
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: api,client,easyvista,itsm,rest,service-manager
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Requires-Dist: httpx>=0.27
|
|
27
|
+
Requires-Dist: pydantic>=2.8
|
|
28
|
+
Requires-Dist: tenacity>=8.2
|
|
29
|
+
Requires-Dist: typing-extensions>=4.7; python_version < '3.11'
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
32
|
+
Requires-Dist: mypy>=1.11; extra == 'dev'
|
|
33
|
+
Requires-Dist: numpydoc>=1.8; extra == 'dev'
|
|
34
|
+
Requires-Dist: pre-commit>=4.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: respx>=0.21; extra == 'dev'
|
|
39
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
40
|
+
Requires-Dist: sphinx-rtd-theme>=2.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: sphinx<8.2,>=7.2; extra == 'dev'
|
|
42
|
+
Requires-Dist: tokenize-rt==6.2.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'dev'
|
|
44
|
+
Requires-Dist: twine>=5.1; extra == 'dev'
|
|
45
|
+
Requires-Dist: unasync==0.6.0; extra == 'dev'
|
|
46
|
+
Requires-Dist: vulture>=2.11; extra == 'dev'
|
|
47
|
+
Provides-Extra: docs
|
|
48
|
+
Requires-Dist: numpydoc>=1.8; extra == 'docs'
|
|
49
|
+
Requires-Dist: sphinx-rtd-theme>=2.0; extra == 'docs'
|
|
50
|
+
Requires-Dist: sphinx<8.2,>=7.2; extra == 'docs'
|
|
51
|
+
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'docs'
|
|
52
|
+
Description-Content-Type: text/markdown
|
|
53
|
+
|
|
54
|
+
# easyvista-python-client
|
|
55
|
+
|
|
56
|
+
Typed Python client for the EasyVista Service Manager REST API. Sync + async,
|
|
57
|
+
Pydantic models, Bearer or Basic auth.
|
|
58
|
+
|
|
59
|
+
While the package is preparing for 1.0, alot of potential breaking change might happen between versions. A deprecation policy will be put in place once 1.0 is out and the package have been stabilized.
|
|
60
|
+
|
|
61
|
+
## Documentation
|
|
62
|
+
|
|
63
|
+
Full documentation: https://easyvista-python-client.readthedocs.io/
|
|
64
|
+
|
|
65
|
+
Build it locally with `pip install -e ".[docs]"` then
|
|
66
|
+
`sphinx-build -b html -W docs docs/_build/html`.
|
|
67
|
+
|
|
68
|
+
## Install
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pip install easyvista-python-client
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Usage (sync)
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
from easyvista_python_client import (
|
|
78
|
+
EasyvistaClient,
|
|
79
|
+
EasyvistaConfig,
|
|
80
|
+
PostRequest,
|
|
81
|
+
ev_equals_filter,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
config = EasyvistaConfig(server="https://my.easyvista.com", account="12345", token="...")
|
|
85
|
+
with EasyvistaClient(config) as client:
|
|
86
|
+
# catalog_code, the *_id values and the close status_guid are instance-specific.
|
|
87
|
+
ticket = client.create_ticket(
|
|
88
|
+
PostRequest(
|
|
89
|
+
catalog_code="INC_STANDARD",
|
|
90
|
+
title="Printer down",
|
|
91
|
+
description="The 3rd-floor printer is offline",
|
|
92
|
+
origin=7,
|
|
93
|
+
department_id=9,
|
|
94
|
+
urgency_id=8,
|
|
95
|
+
impact_id=28,
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
fetched = client.get_ticket(ticket.rfc_number)
|
|
99
|
+
open_status = ev_equals_filter("STATUS_ID", 3)
|
|
100
|
+
results = client.search_tickets(search=open_status, max_rows=50)
|
|
101
|
+
|
|
102
|
+
# page through everything with the iterator (follows the API's offset paging)
|
|
103
|
+
for t in client.iter_tickets(search=open_status, page_size=100, max_records=1000):
|
|
104
|
+
... # async: `async for t in client.iter_tickets(...)`
|
|
105
|
+
|
|
106
|
+
# close it with your instance's "closed" status GUID
|
|
107
|
+
client.close_ticket(
|
|
108
|
+
ticket.rfc_number,
|
|
109
|
+
status_guid="{00000000-0000-0000-0000-000000000000}",
|
|
110
|
+
delete_actions=1,
|
|
111
|
+
comment="Resolved",
|
|
112
|
+
)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
> Minimum fields for a create are catalog-specific (server-side). `catalog_code` + `title`
|
|
116
|
+
> work for incident catalogs; a missing mandatory field raises `EasyvistaValidationError`
|
|
117
|
+
> (HTTP 590, code 2013) — it is not retried.
|
|
118
|
+
|
|
119
|
+
## Assets and documents
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
from pathlib import Path
|
|
123
|
+
from easyvista_python_client import (
|
|
124
|
+
EasyvistaClient,
|
|
125
|
+
EasyvistaConfig,
|
|
126
|
+
PostAsset,
|
|
127
|
+
ev_equals_filter,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
with EasyvistaClient(EasyvistaConfig.from_env()) as client:
|
|
131
|
+
asset = client.create_asset(PostAsset(catalog_id=3153, asset_tag="LAPTOP-001"))
|
|
132
|
+
tag_filter = ev_equals_filter("ASSET_TAG", "LAPTOP-001")
|
|
133
|
+
found = client.search_assets(search=tag_filter, max_rows=50)
|
|
134
|
+
|
|
135
|
+
# attach a file to a ticket (uploaded as base64 inside the JSON body)
|
|
136
|
+
pdf = Path("report.pdf")
|
|
137
|
+
client.add_document("I240101_0001", filename=pdf.name, content=pdf.read_bytes())
|
|
138
|
+
attachments = client.list_documents("I240101_0001")
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Usage (async)
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
from easyvista_python_client import AsyncEasyvistaClient, EasyvistaConfig
|
|
145
|
+
|
|
146
|
+
async with AsyncEasyvistaClient(EasyvistaConfig.from_env()) as client:
|
|
147
|
+
ticket = await client.get_ticket("I240101_0001")
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Configuration via environment
|
|
151
|
+
|
|
152
|
+
Set `EASYVISTA_URL` (or `EASYVISTA_SERVER`), `EASYVISTA_ACCOUNT`, and either
|
|
153
|
+
`EASYVISTA_TOKEN` / `EASYVISTA_TOKEN_FILE` or `EASYVISTA_LOGIN` + `EASYVISTA_PASSWORD`,
|
|
154
|
+
then call `EasyvistaConfig.from_env()`.
|
|
155
|
+
|
|
156
|
+
## Agent skills
|
|
157
|
+
|
|
158
|
+
`skills/` holds Agent Skills for driving this client from an AI agent — one per
|
|
159
|
+
domain (client setup, search syntax, tickets, actions, documents, assets,
|
|
160
|
+
directory, reporting and context). Each is a directory with a `SKILL.md`
|
|
161
|
+
following the Agent Skills specification; see [skills/README.md](skills/README.md)
|
|
162
|
+
for the index.
|
|
163
|
+
|
|
164
|
+
They are source-tree material: present in the git repository and the source
|
|
165
|
+
distribution, absent from the installed wheel.
|
|
166
|
+
|
|
167
|
+
## Contributing
|
|
168
|
+
|
|
169
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and quality checks.
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
MIT — see [LICENSE](LICENSE).
|
|
174
|
+
|
|
175
|
+
## Sponsoring
|
|
176
|
+
|
|
177
|
+
The development of this package is indirectly supported by
|
|
178
|
+
[Novahé](https://www.novahe.fr/) & [Constellation](https://www.constellation.fr/).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
easyvista_python_client/__init__.py,sha256=Z0sn4EYCSKKSc_829yG-C0o3jDuwkdNbZY2uIGChU3I,1966
|
|
2
|
+
easyvista_python_client/_fields.py,sha256=vR2R7h3fnJ64Qh9cGTIjh5fKhjLTLsQnugqdJgUOzSM,928
|
|
3
|
+
easyvista_python_client/_html.py,sha256=KftxdX4vHptQrOMqfWM-9I3g03UAA5YRmqwnLjI2Ir4,1276
|
|
4
|
+
easyvista_python_client/_transport.py,sha256=IV-i-wHFaRx5jl5sCXK_7MEWiKULjK-XWoEPGNazwvg,1068
|
|
5
|
+
easyvista_python_client/config.py,sha256=8re4ZUHixUfxyFVlApwpLfCHxGfHfVHy00dkDPnS6Zk,2377
|
|
6
|
+
easyvista_python_client/context.py,sha256=_xIlsHsaOMc2KMuIIGoqJMAPK56wZrt5p5-axnLiHSY,5074
|
|
7
|
+
easyvista_python_client/directory.py,sha256=riEs3aR5Z4XVAg2jWqWA4AeYpfDAeMCtsmoDxPEtUDc,1893
|
|
8
|
+
easyvista_python_client/exceptions.py,sha256=ydxQ2aymKeWtZdX6VL-rNaO4YdicI4FmCPM7_kVTN_Q,1680
|
|
9
|
+
easyvista_python_client/field_model.py,sha256=OGuq1DXSILOzF1AefK7L6Dbw376cWm3DBZ0eQ0yA3qI,2634
|
|
10
|
+
easyvista_python_client/filters.py,sha256=Kk_2561n1BE62CAFvru0mmOdGWHOI4mpTa4PhlOHv7c,2885
|
|
11
|
+
easyvista_python_client/pagination.py,sha256=y5orhpUiL3sFZ_c7v6QE4S2mDnC4VZNDAxm2IvvYiTU,3018
|
|
12
|
+
easyvista_python_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
easyvista_python_client/references.py,sha256=L_IoOVVTsk49RAP3jrWGtmAzZtpB31p1mRF60nuNC6o,5510
|
|
14
|
+
easyvista_python_client/reporting.py,sha256=b9wTsbDT4Hy0CWrVQg2ujOlIr5h7qXuf2aocHhIWK2A,5082
|
|
15
|
+
easyvista_python_client/_async/__init__.py,sha256=pg5E76VOB1ruJNVpqzatRm9TJBdPhAcDhsmBKlcRotc,612
|
|
16
|
+
easyvista_python_client/_async/_concurrency.py,sha256=5Ce9LZKRkGgT_AVSE93IeU2gl-Z3Jq84YxWK3EL-FMM,3826
|
|
17
|
+
easyvista_python_client/_async/_transport.py,sha256=4Zlyxe9M76YumPWcSdElYZfsxdmcKwLYkxTBLD4R9y8,11144
|
|
18
|
+
easyvista_python_client/_async/client.py,sha256=r3QOvMdoKc6lcs0BzqtLPKeVHdNP8TzvQjS8goQ404I,33266
|
|
19
|
+
easyvista_python_client/_sync/__init__.py,sha256=TKnndsi6v7S43so4X6fg_hZy3wg45Jk40pYCQ2FkgR0,601
|
|
20
|
+
easyvista_python_client/_sync/_concurrency.py,sha256=zeCtzdrMQa9thzdV6A5sdP8Ojojgjkhbx6X8pH7qWGw,1750
|
|
21
|
+
easyvista_python_client/_sync/_transport.py,sha256=ESQzbK-rMix5_sLS4QD6B1yAEsuI6bbTQrqbTdA7rMM,11041
|
|
22
|
+
easyvista_python_client/_sync/client.py,sha256=f-RBBpP0bHsFrN5ZrjTmVUMYUjL1LtWs1LJDNFLT5bY,32588
|
|
23
|
+
easyvista_python_client/models/__init__.py,sha256=dCN1GPDWqu5zraEuGiCZaUGXyNQiK3yCuAC18Fh6NL4,47
|
|
24
|
+
easyvista_python_client/models/action.py,sha256=94eX4If06OOlfuXkLJUCj67VCMV0yYGzpbVZt__MhY4,2997
|
|
25
|
+
easyvista_python_client/models/asset.py,sha256=mx9tYBmAT4-Mn6dHOefc1mzh_t5NBo1Q5W51iLvNxJ0,1189
|
|
26
|
+
easyvista_python_client/models/common.py,sha256=9gJVle_6__Z2Fb3vkERbOTheD_rf_vzUkiEggphJFV0,2916
|
|
27
|
+
easyvista_python_client/models/department.py,sha256=eFvpna182TgrMMpv9_HnWubc-PLJgIXO-yPPxlq5TZ8,2588
|
|
28
|
+
easyvista_python_client/models/document.py,sha256=SkSmwZLpZrS1_OTpAcaDjomP8GcEyn4STnQZzK0Xwi0,1341
|
|
29
|
+
easyvista_python_client/models/employee.py,sha256=wOEIAOx_jDrlPZpdkWrGySu3UXkmN9zbL_oQnDev_F4,2967
|
|
30
|
+
easyvista_python_client/models/request.py,sha256=ZPkudojJGbdoICpwXhq_EVNU5ZCAmgod0vREtwexTtY,8659
|
|
31
|
+
easyvista_python_client/resources/__init__.py,sha256=UXwFN01OuF__HlYFPoYQt28P247kt3FoVKFClqNVCIk,73
|
|
32
|
+
easyvista_python_client/resources/actions.py,sha256=APXcs8HEWfLmwl1wqYmf-u5CRxzkpWHcF_YxMBd5GZw,2955
|
|
33
|
+
easyvista_python_client/resources/assets.py,sha256=YPmf4i2feS2c2uw6QU52-flHg7fsdawEL5Z48dL0o0k,1321
|
|
34
|
+
easyvista_python_client/resources/departments.py,sha256=FylNkg91zvuXwIjA5LJGeKWbqn6LaGwAji0UfDGvCV4,1572
|
|
35
|
+
easyvista_python_client/resources/descriptor.py,sha256=TR3bgnej76D3t_QCqCkVcmTMppMlsr8PBFA519gNpvo,3395
|
|
36
|
+
easyvista_python_client/resources/documents.py,sha256=PaGOKhu32A93o_IB9Fg2CTQ4AH3PE1Pvq0Me17Dyv-c,2686
|
|
37
|
+
easyvista_python_client/resources/employees.py,sha256=HYb7FK3nf7dkjf5FlGCWawf32O1vPFJOcFGLoQQhuCw,1516
|
|
38
|
+
easyvista_python_client/resources/requests.py,sha256=SkO6uX2Wilqcm6tZP-6mXow5ShMcz29g86Qx6f3RfqI,2814
|
|
39
|
+
easyvista_python_client-0.1.0.dist-info/METADATA,sha256=5t5DBcMlnfkE3qwnEtsRosxyyPaXcnHRle4TkMovhhM,6503
|
|
40
|
+
easyvista_python_client-0.1.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
41
|
+
easyvista_python_client-0.1.0.dist-info/licenses/LICENSE,sha256=COAKFzPjsNCUJS82NnwBj20wPEHE34Dl8GzGZzaQWR0,1093
|
|
42
|
+
easyvista_python_client-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 easyvista-python-client contributors
|
|
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.
|