Skip to main content

PyPI Version PyPI Downloads

Itzam python sdk

itzam logo

Overview

Itzam Python SDK provides a simple interface to interact with the Itzam API for text generation, thread management, model listing, and run inspection.

Installation

pip install itzam

Quick Start

from itzam import Itzam

client = Itzam("your-api-key")
response = client.text.generate(
  workflow_slug="your_workflow_slug",
  input="Hello, Itzam!",
  stream=False
)
print(response.text)

Authentication

You can provide your API key directly or set it as an environment variable:

export ITZAM_API_KEY=your-api-key

Then initialize without arguments:

from itzam import Itzam
client = Itzam()

Features

  • Text Generation: Generate text using your workflows.
  • Threads: Create and manage threads for conversations.
  • Models: List available models and their details.
  • Runs: Inspect previous runs and their metadata.

Usage Examples

See available models

python3 -m itzam.models

Generate Text

response = client.text.generate(
  workflow_slug="your_workflow_slug",
  input="Write a poem about the sea."
)
print(response.text)

Stream Text Generation

for delta in client.text.generate(
  workflow_slug="your_workflow_slug",
  input="Tell me a story.",
  stream=True
):
  print(delta, end="", flush=True)

List Models

models = client.models.list()
for model in models:
  print(model.name, model.tag)

Create a Thread

thread = client.threads.create(
  workflow_slug="your_workflow_slug",
  name="Support Conversation"
)
print(thread.id)

Get a Run

run = client.runs.get("run_id")
print(run.output)

Advanced

You can specify a custom API base URL if needed:

client = Itzam(api_key="your-api-key", base_url="https://itz.am")

Requirements

  • Python 3.10+
  • requests
  • pydantic
  • rich
  • python-dotenv (optional, for environment variable loading)

License

MIT


For more details, see the API documentation.

Metadata

Release files for itzam 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for itzam 1.2.0
File Size Uploaded Provenance
itzam-1.2.0.tar.gz 9.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for itzam 1.2.0
File Interpreter ABI Platform
itzam-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.3 kB

Release files / itzam-1.2.0.tar.gz

Download URL itzam-1.2.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d2ed423ef6a938c448c7374646a61c085e34cde6efb17ccac134b609151a7026
BLAKE2b-256 checksum
How to use checksums
0d09cd0221ece14f88de4d9303dd103644a29224f77d6283e09c2caac15969f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.12

Release files / itzam-1.2.0-py3-none-any.whl

Download URL itzam-1.2.0-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e98e6855b4a46d9ab0c46fe02fa1edb87aa05faa3442e6ce656a0d1e07628a5
BLAKE2b-256 checksum
How to use checksums
57a67b0160b3ac25b231db42397a76df248d0e986e4760acf4a6081249feb207
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.12

Security for itzam 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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