{"id":37670736,"url":"https://github.com/itential/ipsdk","last_synced_at":"2026-01-16T12:03:55.997Z","repository":{"id":288653284,"uuid":"968701727","full_name":"itential/ipsdk","owner":"itential","description":"Itential Python SDK","archived":false,"fork":false,"pushed_at":"2025-12-30T05:13:15.000Z","size":590,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"devel","last_synced_at":"2026-01-02T15:03:50.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itential.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-04-18T15:13:35.000Z","updated_at":"2025-12-30T05:13:19.000Z","dependencies_parsed_at":"2025-12-17T06:05:17.215Z","dependency_job_id":null,"html_url":"https://github.com/itential/ipsdk","commit_stats":null,"previous_names":["itential/ipsdk"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/itential/ipsdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itential%2Fipsdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itential%2Fipsdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itential%2Fipsdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itential%2Fipsdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itential","download_url":"https://codeload.github.com/itential/ipsdk/tar.gz/refs/heads/devel","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itential%2Fipsdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-16T12:03:55.406Z","updated_at":"2026-01-16T12:03:55.988Z","avatar_url":"https://github.com/itential.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipsdk\n\n[![PyPI version](https://badge.fury.io/py/ipsdk.svg)](https://badge.fury.io/py/ipsdk)\n[![Python Versions](https://img.shields.io/pypi/pyversions/ipsdk.svg)](https://pypi.org/project/ipsdk/)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![Tests](https://github.com/itential/ipsdk/workflows/Run%20pre%20merge%20pipeline/badge.svg)](https://github.com/itential/ipsdk/actions)\n[![Coverage](https://img.shields.io/badge/coverage-95%25-green)](https://github.com/itential/ipsdk)\n\nThe Itential Python SDK provides a robust client implementation in Python for writing\nscripts and applications that can make API calls to Itential Platform or Itential\nAutomation Gateway 4.x.\n\n**Status**: Beta - Active development with comprehensive test coverage (95%+)\n\n## Features\n\n- **Easy API Requests**: Automatic authentication on first API call with session management\n- **Multiple Authentication Methods**:\n  - OAuth (client credentials) for Itential Platform\n  - Basic authentication (username/password) for both Platform and Gateway\n- **Sync and Async Support**: Both synchronous and asynchronous HTTP clients via `want_async` parameter\n- **Comprehensive Logging**: Custom logging system with multiple levels (including FATAL), file and console handlers, and httpx integration control\n- **Flexible Configuration**: Customizable connection settings including TLS, certificate verification, timeouts, and proxy support\n- **Type Safety**: Full type hints with mypy support for enhanced development experience\n- **HTTP Methods**: Support for GET, POST, PUT, DELETE, and PATCH operations with automatic JSON handling\n- **Request/Response Wrappers**: Enhanced request and response objects with additional utilities beyond raw httpx\n\n## Getting started\n\n## Requirements\n\n- Python 3.10 or higher\n- httpx \u003e= 0.28.1\n\n### Tested Python Versions\n\n| Python Version | Status | Notes |\n|----------------|--------|-------|\n| 3.10           | ✅ Tested | Minimum recommended version |\n| 3.11           | ✅ Tested | Full support |\n| 3.12           | ✅ Tested | Full support |\n| 3.13           | ✅ Tested | Latest stable release |\n| 3.14           | 🔄 Beta | Development/preview testing |\n\nThe SDK is automatically tested against Python 3.10-3.13 in our CI pipeline to ensure compatibility across all supported versions.\n\n## Installation\n\nInstall `ipsdk` using pip:\n\n```bash\n$ pip install ipsdk\n```\n\nOr using uv (recommended for development):\n\n```bash\n$ uv add ipsdk\n```\n\nThe `ipsdk` package provides factory functions for connecting to either\nItential Platform or Itential Automation Gateway.\n\nThe `platform_factory(...)` function creates a connection to Itential Platform\nThe `gateway_factory(...)` function creates a connection to Itential Automation Gateway\n\n### Basic Authentication\n\nUse basic authentication with username and password:\n\n```python\n\u003e\u003e\u003e import ipsdk\n\u003e\u003e\u003e platform = ipsdk.platform_factory(\n...     host=\"platform.itential.dev\",\n...     user=\"admin@pronghorn\",\n...     password=\"your-password\"\n... )\n\u003e\u003e\u003e res = platform.get(\"/health/server\")\n\u003e\u003e\u003e res\n\u003cResponse [200 OK]\u003e\n\u003e\u003e\u003e res.text\n'{\"version\":\"15.8.10-2023.2.44\",\"release\":\"2023.2.9\"...`\n```\n\n### OAuth Authentication\n\nFor Itential Platform, you can use OAuth with client credentials:\n\n```python\n\u003e\u003e\u003e import ipsdk\n\u003e\u003e\u003e platform = ipsdk.platform_factory(\n...     host=\"platform.itential.dev\",\n...     client_id=\"your-client-id\",\n...     client_secret=\"your-client-secret\"\n... )\n\u003e\u003e\u003e res = platform.get(\"/adapters\")\n```\n\n### Gateway Connection\n\nConnecting to Itential Automation Gateway uses the same pattern:\n\n```python\n\u003e\u003e\u003e import ipsdk\n\u003e\u003e\u003e gateway = ipsdk.gateway_factory(\n...     host=\"gateway.itential.dev\",\n...     user=\"admin@itential\",\n...     password=\"your-password\"\n... )\n\u003e\u003e\u003e res = gateway.get(\"/devices\")\n```\n\n### Async Support\n\nThe SDK fully supports `asyncio` for asynchronous operations. Set `want_async=True`\nwhen creating the connection:\n\n```python\nimport asyncio\nimport ipsdk\n\nasync def main():\n    p = ipsdk.platform_factory(\n        host=\"platform.itential.dev\",\n        user=\"admin@pronghorn\",\n        want_async=True\n    )\n\n    res = await p.get(\"/adapters\")\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n## HTTP Methods\n\nThe connection object supports the following HTTP methods:\n\n- `GET` - Sends a HTTP GET request to the server and returns the results\n- `POST` - Sends a HTTP POST request to the server and returns the results\n- `PUT` - Sends a HTTP PUT request to the server and returns the results\n- `DELETE` - Sends a HTTP DELETE request to the server and returns the results\n- `PATCH` - Sends a HTTP PATCH request to the server and returns the results\n\nThe following table shows the keyword arguments for each HTTP method:\n\n | Keyword  | `GET`         | `POST`   | `PUT`    | `DELETE`      | `PATCH`  |\n |----------|---------------|----------|----------|---------------|----------|\n | `path`   | Required      | Required | Required | Required      | Required |\n | `params` | Optional      | Optional | Optional | Optional      | Optional |\n | `json`   | Not Supported | Optional | Optional | Not Supported | Optional |\n\nThe `path` argument specifies the relative path of the URI.   This value is\nprepended to the base URL.  The base URL for Itential Platform is `\u003chost\u003e` and\nthe base URL for Itential Automation Gateway is `\u003chost\u003e/api/v2.0`.\n\nThe `params` argument accepts a `dict` object that is transformed into the URL\nquery string.  For example, if `params={\"foo\": \"bar\"}` the resulting query\nstring would be `?foo=bar`\n\nThe `json` argument accepts the payload to send in the request as JSON. This\nargument accepts either a `list` or `dict` object. When specified, the data\nwill automatically be converted to a JSON string and the `Content-Type` and\n`Accept` headers will be set to `application/json`.\n\n## Configuration\n\nBoth the `platform_factory` and `gateway_factory` functions support\nconfiguration using keyword arguments. The table below shows the keyword\narguments for each function along with their default value.\n\n | Keyword         | `platform_factory` | `gateway_factory` |\n |-----------------|--------------------|-------------------|\n | `host`          | `localhost`        | `localhost`       |\n | `port`          | `0`                | `0`               |\n | `use_tls`       | `True`             | `True`            |\n | `verify`        | `True`             | `True`            |\n | `user`          | `admin`            | `admin@itential`  |\n | `password`      | `admin`            | `admin`           |\n | `client_id`     | `None`             | Not Supported     |\n | `client_secret` | `None`             | Not Supported     |\n | `timeout`       | `30`               | `30`              |\n | `want_async`    | `False`            | `False`           |\n\n## Logging\n\nThe SDK includes a comprehensive logging system accessible via `ipsdk.logging`:\n\n```python\nimport ipsdk\n\n# Configure logging level\nipsdk.logging.set_level(ipsdk.logging.DEBUG)\n\n# Enable file logging\nipsdk.logging.configure_file_logging(\n    \"/path/to/logfile.log\",\n    level=ipsdk.logging.INFO\n)\n\n# Use convenience functions\nipsdk.logging.info(\"Connected to platform\")\nipsdk.logging.debug(\"Request details: %s\", request_data)\nipsdk.logging.error(\"API call failed\")\n```\n\n**Logging Features**:\n- **Multiple Log Levels**: DEBUG, INFO, WARNING, ERROR, CRITICAL, and custom FATAL (90) level\n- **Convenience Functions**: `debug()`, `info()`, `warning()`, `error()`, `critical()`, `fatal()`, `exception()`\n- **File Logging**: Automatic directory creation and custom formatting support\n- **Console Control**: Switch between stdout/stderr output\n- **httpx Integration**: Optional control of httpx/httpcore logging via `propagate` parameter\n- **Handler Management**: Add/remove file handlers and customize console output\n\nFor detailed logging documentation, see the logging module docstrings.\n\n## Development\n\nFor development setup, testing, and contribution guidelines, see the [Development Guide](docs/development.md).\n\n\n## License\n\nThis project is licensed under the GPLv3 open source license.  See\n[license](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitential%2Fipsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitential%2Fipsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitential%2Fipsdk/lists"}