Skip to main content

Asteroid Odyssey Python SDK

Python SDK for the Asteroid API.

Installation

pip install asteroid-odyssey

Usage

from asteroid_odyssey import ApiClient, Configuration, ExecutionApi, WorkflowsApi

config = Configuration(
    host="https://odyssey.asteroid.ai",
    api_key={"ApiKeyAuth": "your-api-key"}
)

client = ApiClient(config)
workflows_api = WorkflowsApi(client)
execution_api = ExecutionApi(client)

response = workflows_api.workflow_execute_post(
    workflow_id="your-workflow-id",
    workflows_workflow_execute_request={"inputs": {"input": "value"}}
)
print(f"Execution ID: {response.execution_id}")

execution = execution_api.execution_get(execution_id=response.execution_id)
print(f"Status: {execution.status}")

The API can add enum values, such as a new status. This SDK parses a value it does not know and keeps it as a string, so compare by value (execution.status == "running") and give every match on an enum a default case.

Migrating from the agent functions

A workflow is what you build and run. It used to be called an agent. A version is one immutable snapshot of a workflow. It used to be called a workflow. An agent is now the AI node inside a workflow.

The old methods still work and call the old /agents routes. They are marked deprecated and will be removed in a future major release. Move to the new methods:

Old New
AgentsApi.agent_list WorkflowsApi.workflow_list
AgentsApi.agent_create WorkflowsApi.workflow_create
AgentsApi.available_tools_list WorkflowsApi.workflow_available_tools_list
AgentsApi.agent_by_id_update WorkflowsApi.workflow_by_id_update
AgentsApi.agent_by_id_delete WorkflowsApi.workflow_by_id_delete
AgentsApi.agent_execute_post WorkflowsApi.workflow_execute_post
AgentsApi.agent_execute_sync_post WorkflowsApi.workflow_execute_sync_post
FilesApi.agent_workflow_head_get_files FilesApi.workflow_head_get_files
FilesApi.agent_workflow_head_patch_files FilesApi.workflow_head_patch_files
FilesApi.agent_workflow_head_publish_head FilesApi.workflow_head_publish
WorkflowsApi.agent_workflows_list WorkflowVersionsApi.workflow_versions_list
WorkflowsApi.agent_workflows_create WorkflowVersionsApi.workflow_versions_create
WorkflowsApi.agent_workflows_validate WorkflowVersionsApi.workflow_versions_validate
WorkflowsApi.agent_workflows_get WorkflowVersionsApi.workflow_versions_get
WorkflowsApi.agent_workflows_delete_workflow WorkflowVersionsApi.workflow_versions_delete
WorkflowsApi.agent_workflows_execute WorkflowVersionsApi.workflow_versions_execute
WorkflowsApi.agent_workflows_get_files_by_version WorkflowVersionsApi.workflow_versions_get_files
WorkflowsApi.agent_workflows_get_inputs WorkflowVersionsApi.workflow_versions_get_inputs
WorkflowsApi.agent_workflows_get_output_schemas WorkflowVersionsApi.workflow_versions_get_output_schemas
WorkflowsApi.agent_workflows_publish WorkflowVersionsApi.workflow_versions_publish

Field names follow the same rule:

Where Old New
New /workflows routes agent_id workflow_id
New /workflows routes version workflow_id version_id
Workflow detail agent, workflow, versions_metadata workflow, version, versions
File tree workflow_id, agent_name version_id, workflow_name
Execution, scheduled execution and batch responses agent_id, agent_name workflow_id, workflow_name
Execution, scheduled execution and batch responses workflow_id (the version) workflow_version_id

On execution, scheduled execution and batch responses, workflow_id now holds the workflow ID, not the version ID. Read workflow_version_id for the version.

Documentation

See docs.asteroid.ai for full documentation.

Metadata

Release files for asteroid-odyssey 1.9.487

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

Source distribution (sdist)

Source distribution for asteroid-odyssey 1.9.487
File Size Uploaded Provenance Actions
asteroid_odyssey-1.9.487.tar.gz 191.9 kB Without provenance Details for asteroid_odyssey-1.9.487.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for asteroid-odyssey 1.9.487
File Interpreter ABI Platform Actions
asteroid_odyssey-1.9.487-py3-none-any.whl Python 3 none any Details for asteroid_odyssey-1.9.487-py3-none-any.whl

Total release size: 773.9 kB

Release files / asteroid_odyssey-1.9.487.tar.gz

Download URL asteroid_odyssey-1.9.487.tar.gz
Size 191.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8580667a0270bc267fa9382898ac8167b2a0d3cfc92b5c83481dc0734ce75af8
BLAKE2b-256 checksum
How to use checksums
6779e401edac09da39d444d3b6cf3078814d30727d36be6382f9f87e62d1e4f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / asteroid_odyssey-1.9.487-py3-none-any.whl

Download URL asteroid_odyssey-1.9.487-py3-none-any.whl
Size 581.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3083aa1fd80e97a0a8ef3bea239b8ada4bfa1d55c376b153fb686ec5d3e4491
BLAKE2b-256 checksum
How to use checksums
719995518d59ced9f5556a9f39c6d64d6a7deb10ea63186849ef0e48907d7a5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for asteroid-odyssey 1.9.487

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.9.487 This release

2 release files No provenance

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