Skip to main content

glytos

CI PyPI License

The official Glytos server SDK for Python.

Call the Glytos API from your backend with an API key: build and run voice agents, start phone calls, mint browser web-call tokens, manage phone numbers, and verify webhooks.

Never ship an API key to the browser. For in-browser voice, use the @glytos/web package with a short-lived token you mint here.

Install

pip install glytos

Quickstart

from glytos import Glytos

glytos = Glytos(api_key="gly_...")

# List your agents
agents = glytos.workflows.list()

# Mint a web-call token for the browser
token = glytos.calls.web_token(workflow_uuid=agents[0]["uuid"])
print(token["token"], token["ws_url"])

Use it as a context manager to close the HTTP connection cleanly:

with Glytos(api_key="gly_...") as glytos:
    overview = glytos.request("GET", "/analytics/overview")

Resources

Namespace Methods
glytos.workflows list, retrieve, create, publish, delete, templates, session, session_events
glytos.calls create, list, retrieve, web_token, control
glytos.phone_numbers search, list, provision, assign, release
glytos.sessions list
glytos.webhooks list, create, delete, events, verify

Any endpoint without a dedicated helper is one call away with glytos.request(method, path, json=..., params=...).

Errors

Non-2xx responses raise a GlytosError with the API error code, HTTP status, and the request_id:

from glytos import GlytosError

try:
    glytos.workflows.retrieve("missing")
except GlytosError as err:
    print(err.status, err.code, err.message)

Webhooks

Verify a delivery came from Glytos before trusting it. Pass the raw request body, the X-Glytos-Signature header, and your endpoint secret:

from glytos import verify_webhook

# e.g. in a Flask/FastAPI handler
ok = verify_webhook(raw_body, request.headers["X-Glytos-Signature"], webhook_secret)
if not ok:
    abort(400)

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glytos-0.1.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

glytos-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file glytos-0.1.1.tar.gz.

File metadata

  • Download URL: glytos-0.1.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for glytos-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7baea46a405e341ce7dee3a597bd9367414cc540f1c5625d5b84084564b03419
MD5 40ea7689a5a94f4113b089da0a5fd5e7
BLAKE2b-256 82a522fab5064f7d6ce306594e7791428a850e7964a8b086d8a5e3f738938df8

See more details on using hashes here.

Provenance

The following attestation bundles were made for glytos-0.1.1.tar.gz:

Publisher: release.yml on Glytos/glytos-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glytos-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: glytos-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for glytos-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c44c25be536d274c753650ca8f38f44e377e4cfb22ada4866b8812773c19932
MD5 250c14a3cc735b95b1080dd1fac49255
BLAKE2b-256 53c8ea2d57d09ae3c40ceef7ef3124da09b3182f5b005c1d3ca89829a086eb92

See more details on using hashes here.

Provenance

The following attestation bundles were made for glytos-0.1.1-py3-none-any.whl:

Publisher: release.yml on Glytos/glytos-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page