Skip to main content

SDK for building apps on RunIt

Project description

RunIt SDK

Simple utilities for building FastAPI apps on RunIt.

Installation

The SDK is automatically available in the RunIt runtime. For local development:

pip install -e .

Or install from PyPI (when published):

pip install runit

Quick Start

from fastapi import FastAPI
from runit import context, save_artifact

app = FastAPI()

@app.post("/process")
async def process(data: dict):
    # Access secrets
    api_key = context.get_secret("OPENAI_API_KEY")

    # Access uploaded context
    company = context.get_context("company")

    # Save results
    save_artifact("output.json", json.dumps(result))

    return {"status": "success"}

Features

  • Context Access - Read secrets and uploaded JSON data
  • Artifact Saving - Write outputs that users can download
  • DataFrame Export - Save pandas/polars DataFrames in multiple formats
  • Zero Dependencies - Core functionality has no required dependencies

Documentation

See the SDK Guide for complete documentation and examples.

Sample Apps

Check out the sample apps in ../samples/:

  • extract-company - URL scraping with artifacts
  • image-analysis - File upload and image processing
  • bulk-processor - Batch processing with error handling

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run tests with coverage
pytest --cov=runit --cov-report=html

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

runit_sdk-0.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

runit_sdk-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file runit_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: runit_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for runit_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ee5fddd2c9608be37c1af7ec9a474a15d9fc7dcbce3a6968059336f1c6c22eab
MD5 c880312c7e77606a8aee71de5d9d20b6
BLAKE2b-256 a46e68d8c4130f571306556263bed4748897915172fb787837dae26dbc15dcf6

See more details on using hashes here.

File details

Details for the file runit_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: runit_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for runit_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52c0b480b6c0ebcb20142ebacfaedeae96290a60c72ce4b9696c8315b516d0f2
MD5 259e09f1200c2d8e3e98e1f980ffc0bc
BLAKE2b-256 40012aea825558c7e8b8f423762684b104741cd10100915c2d175837c4adfbcb

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