Skip to main content

Zyra

PyPI version Docs Chat with Zyra Assistant DOI

Zyra Presentation

Zyra is an open-source Python framework for modular, reproducible data workflows — helping you import, process, visualize, and export scientific and environmental data.

Highlights

  • Modular pieces: connectors, processors, visualizers, and utilities.
  • CLI-first & streaming-friendly: compose stages with pipes and configs.
  • Install what you need: keep core small; add extras per stage.

Quickstart

Install

pip install zyra

Try the CLI

zyra --help

Minimal example

# Acquire → Process → Visualize
zyra acquire http https://example.com/sample.grib2 -o sample.grib2
zyra process convert-format sample.grib2 netcdf --stdout > sample.nc
zyra visualize heatmap --input sample.nc --var VAR --output plot.png

More Examples per Module

See module-level READMEs under src/zyra/ for focused examples and options:

  • Connectors/Ingest: src/zyra/connectors/ingest/README.md
  • Processing: src/zyra/processing/README.md
  • API (service): src/zyra/api/README.md
  • MCP Tools: src/zyra/api/mcp_tools/README.md

Learn More (Wiki)

Stage Map

Swarm Orchestration

  • zyra swarm --plan samples/swarm/mock_basic.yaml --dry-run prints the instantiated agents.
  • Remove --dry-run to execute mock simulate→narrate agents; use --memory provenance.db to persist provenance and --guardrails schema.rail to enforce structured outputs.
  • Guardrail validation requires the optional extra: pip install "zyra[guardrails]" (or poetry install --with guardrails) before using --guardrails schema.rail.
  • To exercise the skeleton simulate/decide flow end-to-end, try zyra swarm --plan samples/swarm/simulate_decide.yaml --dry-run (or drop --dry-run to run the mock pipeline).
  • Add --log-events to echo provenance events live, and --dump-memory provenance.db to inspect existing runs without executing new stages.
  • Target specific stages or experiment with partial DAGs using --agents acquire,visualize,narrate; unknown stage names are rejected early so typos do not silently skip work.
  • Control concurrency explicitly with --parallel/--no-parallel (the latter forces max-workers=1) and use --max-workers N when you want a fixed pool size.
  • Override LLM settings for proposal/narrate stages with --provider mock|openai|ollama|gemini|vertex, --model <name>, and --base-url <endpoint> instead of editing .env or wizard config files. Gemini runs with either GOOGLE_API_KEY (Generative Language API) or Vertex credentials (VERTEX_PROJECT, GOOGLE_APPLICATION_CREDENTIALS, etc.).
  • A real-world example lives in samples/swarm/drought_animation.yaml; run it with poetry run zyra swarm --plan samples/swarm/drought_animation.yaml --memory drought.db. Create data/drought/ ahead of time, place earth_vegetation.jpg in your working directory (or adjust the manifest), and ensure Pillow is installed for process pad-missing.
  • Preview planner output (JSON manifest with augmentation suggestions) before running: poetry run zyra plan --intent "mock swarm plan".
  • Plans are YAML/JSON manifests listing agents, dependencies (depends_on), and CLI args; see samples/swarm/ to get started.

Import (acquire/ingest)

Process (transform)

Simulate

Decide (optimize)

Visualize (render)

Narrate

Verify

Export (disseminate; legacy: decimate)

LLM Providers for Wizard/Narrate

Zyra’s Wizard, narrative swarm, and discovery semantic search all share the same provider configuration. Install google-auth when needed with pip install "zyra[llm]" (or poetry install --with llm). Key options:

Provider Configuration
OpenAI OPENAI_API_KEY, optional OPENAI_BASE_URL
Ollama Local server on http://localhost:11434 (override with OLLAMA_BASE_URL)
Gemini (Generative Language API) Set GOOGLE_API_KEY; optional GENLANG_BASE_URL, VERTEX_MODEL (default gemini-2.5-flash)
Gemini (Vertex AI) Provide VERTEX_PROJECT (aliases: GOOGLE_PROJECT_ID, GOOGLE_CLOUD_PROJECT), VERTEX_LOCATION (default us-central1), and Application Default Credentials (GOOGLE_APPLICATION_CREDENTIALS pointing to a service-account JSON). Optional VERTEX_MODEL, VERTEX_ENDPOINT, VERTEX_PUBLISHER.
Mock No credentials needed; deterministic offline responses. Useful for testing.

Example ~/.zyra_wizard.yaml targeting Gemini via Vertex:

provider: gemini
model: gemini-2.5-flash
project: my-vertex-project
location: us-central1

API & Reference Docs

Contributing

License

Apache-2.0 — see LICENSE

Download files

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

Source Distribution

zyra-0.1.49.tar.gz (20.2 MB view details)

Uploaded Source

Built Distribution

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

zyra-0.1.49-py3-none-any.whl (20.3 MB view details)

Uploaded Python 3

File details

Details for the file zyra-0.1.49.tar.gz.

File metadata

  • Download URL: zyra-0.1.49.tar.gz
  • Upload date:
  • Size: 20.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for zyra-0.1.49.tar.gz
Algorithm Hash digest
SHA256 561ca5335c5ffb3fcd673d9e8d405d3e2a264e0aa301e84fef3a2a6ff17257d2
MD5 eeb4c0897a8c0fb6658d78dd6c5b2ff1
BLAKE2b-256 b8b96ac2dd8f50e56f5e27f6831e7069d0409d12810bfee94431148f0eed87ab

See more details on using hashes here.

File details

Details for the file zyra-0.1.49-py3-none-any.whl.

File metadata

  • Download URL: zyra-0.1.49-py3-none-any.whl
  • Upload date:
  • Size: 20.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for zyra-0.1.49-py3-none-any.whl
Algorithm Hash digest
SHA256 d166df3bf37d38970f107c8bb6cf46d3d08117e03fb912283b08ba407930bbf4
MD5 e2093ed61b4b7e93d530cdb1cd05e0dd
BLAKE2b-256 8646e7b8c3b6cd2924beb37308c26cd3b407f91be2d6b90f68ea8b8e761bb3be

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.54

2 files

0.1.53

2 files

0.1.52

2 files

0.1.51

2 files

0.1.50

2 files

This release

0.1.49 This release

2 files

0.1.48

2 files

0.1.47

2 files

0.1.46

2 files

0.1.45

2 files

0.1.44

2 files

0.1.43

2 files

0.1.42

2 files

0.1.41

2 files

0.1.40

2 files

0.1.39

2 files

0.1.38

2 files

0.1.37

2 files

0.1.36

2 files

0.1.35

2 files

0.1.34

2 files

0.1.33

2 files

0.1.32

2 files

0.1.31

2 files

0.1.30

2 files

0.1.29

2 files

0.1.28

2 files

0.1.27

2 files

0.1.26

2 files

0.1.25

2 files

0.1.24

2 files

0.1.23

2 files

0.1.22

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