A typed Python client for GLPI ITSM APIs.
Project description
glpi-python-client
glpi-python-client is a typed Python client for GLPI ITSM APIs.
The goal is to let GLPI integrations work with domain objects instead of raw JSON payloads. The package exposes Pydantic models for tickets, users, followups, documents, locations, and related records, while converting GLPI HTML content into Markdown for Python-side workflows and rendering Markdown back to HTML for outgoing payloads.
It currently focuses on ticket-centric workflows and exposes matching sync and async high-level clients.
Installation
pip install glpi-python-client
For local development:
python -m pip install -e .[dev]
python -m pytest
Quick Start
Create a client with your GLPI API URL and at least one complete auth pair:
client_idandclient_secretusernameandpassword- both pairs together
from glpi_python_client import GlpiClient, GlpiTicket
with GlpiClient(
glpi_api_url="https://glpi.example.com/api.php",
client_id="oauth-client-id",
client_secret="oauth-client-secret",
username="api-user",
password="api-password",
) as glpi:
ticket_id = glpi.create_ticket(
GlpiTicket(
name="Printer issue",
content="The printer is not reachable from the office network.",
urgency=3,
impact=3,
)
)
ticket = glpi.get_ticket_record(ticket_id)
print(ticket.id)
print(ticket.content)
Async code uses the same model layer and nearly the same API surface:
from glpi_python_client import AsyncGlpiClient
async with AsyncGlpiClient(
glpi_api_url="https://glpi.example.com/api.php",
client_id="oauth-client-id",
client_secret="oauth-client-secret",
) as glpi:
tickets = await glpi.search_ticket_records(query='status.id=in=(1,2)')
If your application already provides GLPI_ environment variables,
GlpiClient.from_env() and AsyncGlpiClient.from_env() are also available.
Documentation
To build the Sphinx documentation locally:
python -m pip install -e .[docs]
python -m sphinx -b html docs docs/_build/html
Project details
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 glpi_python_client-0.1.3.tar.gz.
File metadata
- Download URL: glpi_python_client-0.1.3.tar.gz
- Upload date:
- Size: 78.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ca57314d701ebc7dad09b07ef0b2a3788ca852c4ddc9b4c46e4cbd55467f69c
|
|
| MD5 |
f5aab4d50eb6253f4326a797f11031c5
|
|
| BLAKE2b-256 |
8ea26434131451a2a7daf11eb38cccc86f52ccd831097bbe6fff229400c521cb
|
Provenance
The following attestation bundles were made for glpi_python_client-0.1.3.tar.gz:
Publisher:
release.yml on baraline/glpi_python_client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glpi_python_client-0.1.3.tar.gz -
Subject digest:
5ca57314d701ebc7dad09b07ef0b2a3788ca852c4ddc9b4c46e4cbd55467f69c - Sigstore transparency entry: 1524824831
- Sigstore integration time:
-
Permalink:
baraline/glpi_python_client@21f3c5bcac80979eace5e7ce973fc9211e4f1df8 -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/baraline
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@21f3c5bcac80979eace5e7ce973fc9211e4f1df8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file glpi_python_client-0.1.3-py3-none-any.whl.
File metadata
- Download URL: glpi_python_client-0.1.3-py3-none-any.whl
- Upload date:
- Size: 108.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02c316b52932152b498d51f299b719e42c0640690ad77064ea88e41f7ec175b5
|
|
| MD5 |
a523b646e5123056680972dcb8542c5f
|
|
| BLAKE2b-256 |
811d6ba1349ecf0f108b531fed7d6ae67ed2018a06045305d99b79f09aa3ecd8
|
Provenance
The following attestation bundles were made for glpi_python_client-0.1.3-py3-none-any.whl:
Publisher:
release.yml on baraline/glpi_python_client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glpi_python_client-0.1.3-py3-none-any.whl -
Subject digest:
02c316b52932152b498d51f299b719e42c0640690ad77064ea88e41f7ec175b5 - Sigstore transparency entry: 1524824877
- Sigstore integration time:
-
Permalink:
baraline/glpi_python_client@21f3c5bcac80979eace5e7ce973fc9211e4f1df8 -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/baraline
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@21f3c5bcac80979eace5e7ce973fc9211e4f1df8 -
Trigger Event:
release
-
Statement type: