Skip to main content

A client library for accessing Gatana

Project description

gatana-client

Current version: v1.0.1

Python client for the Gatana API, generated using https://github.com/openapi-generators/openapi-python-client. Sync + async, built on httpx. Requires Python 3.10+.

pip install gatana-client

Authentication

Use your user API key or a personal access token as the token:

from gatana_client import AuthenticatedClient

client = AuthenticatedClient(base_url="https://acme.gatana.ai", token="your-api-key-or-pat")

Verify the authenticated identity:

from gatana_client.api.auth import get_auth_me

me = get_auth_me.sync(client=client)  # returns user, tenant, quota metadata

Usage

Endpoints live under gatana_client.api.<group>.<module>. Each module exposes sync(), sync_detailed(), asyncio(), and asyncio_detailed(). The _detailed variants return a Response[T] with status, headers, and parsed body; the plain variants return T | None.

from gatana_client.api.sandboxes import post_sandboxes, post_sandboxes_sandbox_id_exec, delete_sandboxes_sandbox_id
from gatana_client.models.exec_command_body import ExecCommandBody

sandbox_id = post_sandboxes.sync_detailed(client=client).parsed.sandbox.id
result = post_sandboxes_sandbox_id_exec.sync_detailed(sandbox_id, client=client, body=ExecCommandBody(command="echo hi"))
delete_sandboxes_sandbox_id.sync(sandbox_id, client=client)

# async: await post_sandboxes.asyncio(client=client)

File I/O uses gatana_client.types.File:

from gatana_client.api.sandboxes import post_sandboxes_sandbox_id_write_file, post_sandboxes_sandbox_id_read_file
from gatana_client.types import File
import io

post_sandboxes_sandbox_id_write_file.sync(sandbox_id, client=client, body=File(payload=io.BytesIO(b"hello")), path="/tmp/f.txt")
content = post_sandboxes_sandbox_id_read_file.sync_detailed(sandbox_id, client=client, path="/tmp/f.txt").content

Client options

Parameter Default Description
base_url API base URL
token API key or PAT (AuthenticatedClient only)
timeout None httpx.Timeout
verify_ssl True SSL verification
raise_on_unexpected_status False Raise UnexpectedStatus on undocumented HTTP codes instead of returning None
headers / cookies {} Extra headers/cookies per request
httpx_args {} Kwargs forwarded to httpx.Client

Clients support context managers and builder methods (with_headers, with_cookies, with_timeout).

API groups

sandboxes · mcp_servers · teams · users · profiles · auth · tenants · secret_stores · tools · audit_logs · email_verification

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

gatana_client-1.0.1.tar.gz (83.0 kB view details)

Uploaded Source

Built Distribution

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

gatana_client-1.0.1-py3-none-any.whl (320.8 kB view details)

Uploaded Python 3

File details

Details for the file gatana_client-1.0.1.tar.gz.

File metadata

  • Download URL: gatana_client-1.0.1.tar.gz
  • Upload date:
  • Size: 83.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gatana_client-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6476a085d6a31d2284c8d12e4a9a5b70a3c6c61f8df74b3823d406611de98854
MD5 f40177ef49016347903f369dc9134b4d
BLAKE2b-256 f9ada0d3cf1bd6c112915147a1076a6836f3434d0d6bb77fe59f1adc7456efff

See more details on using hashes here.

File details

Details for the file gatana_client-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gatana_client-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 320.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gatana_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4692c93069ade25764d62577dbe54b77aa5c8c1665b8922a0e82aafb0743682c
MD5 b097679ec4ae695c15666968970a2e76
BLAKE2b-256 b9acc71fa08ddd9c2b73685f28762e2b4b342c256e9b13d1cf1c2e98d3b5c479

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