{"id":49895189,"url":"https://github.com/baraline/glpi_python_client","last_synced_at":"2026-05-19T02:01:17.984Z","repository":{"id":357625251,"uuid":"1236601745","full_name":"baraline/glpi_python_client","owner":"baraline","description":"An object-based interface to interact with the GLPI ITSM using the REST API.","archived":false,"fork":false,"pushed_at":"2026-05-16T18:48:22.000Z","size":489,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-18T01:03:40.190Z","etag":null,"topics":["async","glpi","glpi-api","markdown","python","rest-api"],"latest_commit_sha":null,"homepage":"https://glpi-python-client.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baraline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-12T11:57:42.000Z","updated_at":"2026-05-17T10:36:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"c73210b4-a6c2-49af-be8a-e974124633d1","html_url":"https://github.com/baraline/glpi_python_client","commit_stats":null,"previous_names":["baraline/glpi_python_client"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/baraline/glpi_python_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraline%2Fglpi_python_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraline%2Fglpi_python_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraline%2Fglpi_python_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraline%2Fglpi_python_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baraline","download_url":"https://codeload.github.com/baraline/glpi_python_client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraline%2Fglpi_python_client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33198811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"online","status_checked_at":"2026-05-19T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","glpi","glpi-api","markdown","python","rest-api"],"created_at":"2026-05-15T23:19:12.653Z","updated_at":"2026-05-19T02:01:17.932Z","avatar_url":"https://github.com/baraline.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glpi-python-client\n\n[![CI](https://github.com/baraline/glpi_python_client/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/baraline/glpi_python_client/actions/workflows/ci.yml)\n[![Coverage](https://codecov.io/gh/baraline/glpi_python_client/branch/main/graph/badge.svg)](https://codecov.io/gh/baraline/glpi_python_client)\n[![License](https://img.shields.io/github/license/baraline/glpi_python_client)](LICENSE)\n[![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://github.com/baraline/glpi_python_client)\n[![Docs](https://readthedocs.org/projects/glpi-python-client/badge/?version=latest)](https://glpi-python-client.readthedocs.io/en/latest/)\n\n`glpi-python-client` is a typed Python client for GLPI ITSM APIs.\n\nThe goal is to let GLPI integrations work with domain objects instead of raw\nJSON payloads. The package exposes Pydantic models for tickets, users,\nfollowups, documents, locations, and related records, while converting GLPI\nHTML content into Markdown for Python-side workflows and rendering Markdown\nback to HTML for outgoing payloads.\n\nIt currently focuses on ticket-centric workflows and exposes a single\nasynchronous high-level client built on top of the GLPI v2 REST API.\n\nWhile 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.\n\n## Installation\n\n```bash\npip install glpi-python-client\n```\n\nFor local development:\n\n```bash\npython -m pip install -e .[dev]\npython -m pytest\n```\n\n## Quick Start\n\nCreate a client with your GLPI v2 API URL and at least one complete auth pair:\n\n- `client_id` and `client_secret`\n- `username` and `password`\n- both pairs together\n\n```python\nimport asyncio\n\nfrom glpi_python_client import GlpiClient, PostTicket\n\n\nasync def main() -\u003e None:\n    async with GlpiClient(\n        glpi_api_url=\"https://glpi.example.com/api.php/v2\",\n        client_id=\"oauth-client-id\",\n        client_secret=\"oauth-client-secret\",\n        username=\"api-user\",\n        password=\"api-password\",\n    ) as glpi:\n        ticket_id = await glpi.create_ticket(\n            PostTicket(\n                name=\"Printer issue\",\n                content=\"The printer is not reachable from the office network.\",\n            )\n        )\n        ticket = await glpi.get_ticket(ticket_id)\n        print(ticket.id, ticket.name)\n\n\nasyncio.run(main())\n```\n\nIf your application already provides `GLPI_` environment variables,\n`GlpiClient.from_env()` is also available.\n\n### Calling from synchronous code\n\nThe client is async-only, but it works from sync programs through\n`asyncio.run`. Wrap the calls in a coroutine and execute it once:\n\n```python\nimport asyncio\n\nfrom glpi_python_client import GlpiClient\n\n\ndef fetch_open_tickets() -\u003e list[int]:\n    async def _run() -\u003e list[int]:\n        async with GlpiClient.from_env() as glpi:\n            tickets = await glpi.search_tickets(\"status==1\", limit=10)\n            return [ticket.id for ticket in tickets]\n\n    return asyncio.run(_run())\n\n\nif __name__ == \"__main__\":\n    print(fetch_open_tickets())\n```\n\nFor long-lived sync services that need many calls, run a dedicated\nevent loop on a background thread and dispatch with\n`asyncio.run_coroutine_threadsafe`. See the\n[user guide](https://glpi-python-client.readthedocs.io/en/latest/user_guide.html#calling-the-client-from-synchronous-code)\nfor the full pattern.\n\n## Documentation\n\n- [Hosted documentation](https://glpi-python-client.readthedocs.io/en/latest/)\n- [API reference](https://glpi-python-client.readthedocs.io/en/latest/api_reference.html)\n- [Installation guide](https://glpi-python-client.readthedocs.io/en/latest/installation.html)\n- [Development guide](https://glpi-python-client.readthedocs.io/en/latest/development_rtd.html)\n\nTo build the Sphinx documentation locally:\n\n```bash\npython -m pip install -e .[docs]\npython -m sphinx -b html docs docs/_build/html\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaraline%2Fglpi_python_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaraline%2Fglpi_python_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaraline%2Fglpi_python_client/lists"}