Skip to main content

Python SDK for Everruns API

Project description

Everruns SDK for Python

Python SDK for the Everruns API.

Installation

pip install everruns-sdk

Quick Start

import asyncio
from everruns_sdk import Everruns

async def main():
    # Uses EVERRUNS_API_KEY environment variable
    client = Everruns()
    
    # Create an agent
    agent = await client.agents.create(
        name="Assistant",
        system_prompt="You are a helpful assistant.",
    )
    
    # Create a session
    session = await client.sessions.create(agent_id=agent.id)
    
    # Send a message
    await client.messages.create(session.id, "Hello!")
    
    # Stream events
    async for event in client.events.stream(session.id):
        if event.type == "output.message.completed":
            print(event.data)
            break
    
    await client.close()

asyncio.run(main())

Initial Files

from everruns_sdk import Everruns, InitialFile

client = Everruns()

session = await client.sessions.create(
    agent_id="agent_...",
    initial_files=[
        InitialFile(
            path="/workspace/README.md",
            content="# Demo Project\n",
            encoding="text",
            is_readonly=True,
        ),
        InitialFile(
            path="/workspace/src/app.py",
            content='print("hello")\n',
            encoding="text",
        ),
    ],
)

Runnable example: examples/initial_files.py

License

MIT

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

everruns_sdk-0.1.4.tar.gz (53.1 kB view details)

Uploaded Source

Built Distribution

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

everruns_sdk-0.1.4-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file everruns_sdk-0.1.4.tar.gz.

File metadata

  • Download URL: everruns_sdk-0.1.4.tar.gz
  • Upload date:
  • Size: 53.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for everruns_sdk-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6a949cc91bf3951f52c4f03123bb881daa2eae71d36e84aafacb536bd0e7fef5
MD5 7e2a49c9c307d0ae9edfaaa928f24517
BLAKE2b-256 bc7cf75e63fb9fc12311decc58f9b9b2a55b954418b3c81267bf1d35ba9bc083

See more details on using hashes here.

Provenance

The following attestation bundles were made for everruns_sdk-0.1.4.tar.gz:

Publisher: publish.yml on everruns/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file everruns_sdk-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: everruns_sdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for everruns_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 984296e877886b7e55d8dbab70ed54eb1d1ae8116cd014d57013577e02a154ba
MD5 c790c0b3af72c7c34953d4c5011dd9ce
BLAKE2b-256 586f49b7e70267a37501c0e95cf2a698fa59e41ce1d3addfadfa0b6ca94a4aab

See more details on using hashes here.

Provenance

The following attestation bundles were made for everruns_sdk-0.1.4-py3-none-any.whl:

Publisher: publish.yml on everruns/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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