Skip to main content

Python SDK for ServiceOS API

Project description

serviceos

Python SDK for ServiceOS API.

Installation

pip install serviceos

Quick Start

from serviceos import ServiceOS

client = ServiceOS(api_key="sk_...", org_id="org_123")

# List open tickets
tickets = client.tickets.list(status="open")

# Create a ticket
ticket = client.tickets.create(title="Bug report", priority="high")

# Update a ticket
client.tickets.update(ticket["data"]["ticket_id"], status="resolved")

# Auto-paginate
for ticket in client.tickets.list_all(status="open"):
    print(ticket["title"])

# Teams and queues
teams = client.teams.list()
queues = client.queues.list()

Error Handling

from serviceos import ServiceOS, NotFoundError, RateLimitError

try:
    client.tickets.get("nonexistent")
except NotFoundError:
    print("Ticket not found")
except RateLimitError as e:
    print(f"Retry after {e.retry_after}s")

Features

  • Sync HTTP client (httpx)
  • Pydantic models for type-safe parameters
  • Auto-retry with tenacity (429 + 5xx, exponential backoff)
  • Pagination iterator via list_all()
  • Context manager support
  • Debug mode for request logging

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

serviceos-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

serviceos-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file serviceos-0.1.0.tar.gz.

File metadata

  • Download URL: serviceos-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for serviceos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 163406aaef91b91b9fd729fb22b4f594c45d4d101010e8d4de543c566e709dca
MD5 1855839a11ca38e4ac02485975fc92f9
BLAKE2b-256 4ffb8b3098e4233e947a7df6ce3b84cae43125a78f2e4c22a29f2d84860eae49

See more details on using hashes here.

File details

Details for the file serviceos-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: serviceos-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for serviceos-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1be169ad9cfda3c501048c775acbc9efb96cb4f9cabdfc6d6d2b454aa9c05dd
MD5 05b81679335a3d0251c4d00e8076d337
BLAKE2b-256 4d752c8cb26058d6873c8d9bd09dfcaa3be602b3c4b6e7e70cf9d3059d20285c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page