Skip to main content

A client library for accessing Gatana

Project description

gatana-client

Current version: v1.0.2

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 PAT as the token:

from gatana_client import GatanaClient

client = GatanaClient(org_id="acme", token="gk_...")

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.2.tar.gz (83.2 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.2-py3-none-any.whl (321.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gatana_client-1.0.2.tar.gz
  • Upload date:
  • Size: 83.2 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.2.tar.gz
Algorithm Hash digest
SHA256 27389c01ae73ae483b0d72dfaa96030065d1ca95cc6393bc08ec14f64b7d54f6
MD5 23a89bdebc33ca74ec7f40aa5d905b76
BLAKE2b-256 b97890c665e420faf57095481387169dfe855730978490fbf7e22e4749ad26ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gatana_client-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 321.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a47e265b0d9c3c3c80a9ebfcffee1948e9243ceee7fb6ee9e6733266a09a6ddf
MD5 3e492f007da73b64041704abe40d1298
BLAKE2b-256 fee133ec4389bd5594279c2e3cb3abc4a94a16cf705c34fb7ff6da933f597012

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