Metadata-Version: 2.4
Name: runit-sdk
Version: 0.1.0
Summary: SDK for building apps on RunIt
Home-page: https://github.com/buildingopen/runit
Author: RunIt
Author-email: RunIt <hello@buildingopen.org>
License: MIT
Project-URL: Documentation, https://docs.runit.dev
Project-URL: Source, https://github.com/buildingopen/runit
Project-URL: Tracker, https://github.com/buildingopen/runit/issues
Keywords: fastapi,runit,sdk,api,deployment
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Provides-Extra: dataframe
Requires-Dist: pandas>=2.0.0; extra == "dataframe"
Requires-Dist: pyarrow>=14.0.0; extra == "dataframe"
Provides-Extra: excel
Requires-Dist: pandas>=2.0.0; extra == "excel"
Requires-Dist: openpyxl>=3.1.0; extra == "excel"
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: pandas>=2.0.0; extra == "dev"
Requires-Dist: pyarrow>=14.0.0; extra == "dev"
Requires-Dist: openpyxl>=3.1.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# RunIt SDK

Simple utilities for building FastAPI apps on RunIt.

## Installation

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

```bash
pip install -e .
```

Or install from PyPI (when published):

```bash
pip install runit
```

## Quick Start

```python
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](../../../docs/SDK_GUIDE.md) 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

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

# Run tests
pytest

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

## License

MIT
