Metadata-Version: 2.5
Name: skyward
Version: 0.11.0
Summary: Execute Python functions on cloud compute with a simple decorator
Author: Gabriel Francisco
License: MIT
License-File: LICENSE
Keywords: cloud,compute,distributed,gpu,serverless
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: casty>=0.22.1
Requires-Dist: cloudpickle>=3.1
Requires-Dist: loky>=3.5
Requires-Dist: lz4>=4.3
Requires-Dist: msgspec>=0.19
Provides-Extra: all
Requires-Dist: aioboto3>=13.0.0; extra == 'all'
Requires-Dist: asyncssh>=2.22.0; extra == 'all'
Requires-Dist: cryptography>=42; extra == 'all'
Requires-Dist: cyclopts>=3.0; extra == 'all'
Requires-Dist: httpx>=0.28; extra == 'all'
Requires-Dist: ipykernel>=6.0; extra == 'all'
Requires-Dist: jupyter-client>=8.0; extra == 'all'
Requires-Dist: litestar>=2.13; extra == 'all'
Requires-Dist: piccolo[sqlite]>=1.0; extra == 'all'
Requires-Dist: rich>=13.7; extra == 'all'
Requires-Dist: salad-cloud-sdk>=0.9.0a17; extra == 'all'
Requires-Dist: traitlets>=5.0; extra == 'all'
Requires-Dist: uvicorn>=0.30; extra == 'all'
Requires-Dist: websockets>=13; extra == 'all'
Provides-Extra: aws
Requires-Dist: aioboto3>=13.0.0; extra == 'aws'
Provides-Extra: cli
Requires-Dist: cyclopts>=3.0; extra == 'cli'
Provides-Extra: client
Requires-Dist: httpx>=0.28; extra == 'client'
Provides-Extra: gcp
Requires-Dist: cryptography>=42; extra == 'gcp'
Provides-Extra: notebook
Requires-Dist: ipykernel>=6.0; extra == 'notebook'
Requires-Dist: jupyter-client>=8.0; extra == 'notebook'
Requires-Dist: traitlets>=5.0; extra == 'notebook'
Provides-Extra: providers
Requires-Dist: aioboto3>=13.0.0; extra == 'providers'
Requires-Dist: cryptography>=42; extra == 'providers'
Requires-Dist: salad-cloud-sdk>=0.9.0a17; extra == 'providers'
Requires-Dist: websockets>=13; extra == 'providers'
Provides-Extra: salad
Requires-Dist: salad-cloud-sdk>=0.9.0a17; extra == 'salad'
Requires-Dist: websockets>=13; extra == 'salad'
Provides-Extra: server
Requires-Dist: asyncssh>=2.22.0; extra == 'server'
Requires-Dist: cryptography>=42; extra == 'server'
Requires-Dist: httpx>=0.28; extra == 'server'
Requires-Dist: litestar>=2.13; extra == 'server'
Requires-Dist: piccolo[sqlite]>=1.0; extra == 'server'
Requires-Dist: uvicorn>=0.30; extra == 'server'
Provides-Extra: storage
Requires-Dist: aioboto3>=13.0.0; extra == 'storage'
Provides-Extra: tui
Requires-Dist: rich>=13.7; extra == 'tui'
Description-Content-Type: text/markdown

<p align="center">
  <img src="https://github.com/gabfssilva/skyward/blob/main/docs/logo_sky.png?raw=true" alt="Skyward" width="400">
</p>

<p align="center">
  <strong>Cloud accelerators with a single decorator</strong>
</p>

<p align="center">
  <a href="https://github.com/gabfssilva/skyward/actions/workflows/tests.yml"><img src="https://github.com/gabfssilva/skyward/actions/workflows/tests.yml/badge.svg" alt="CI"></a>
  <a href="https://pypi.org/project/skyward/"><img src="https://img.shields.io/pypi/v/skyward" alt="PyPI"></a>
  <a href="https://pypi.org/project/skyward/"><img src="https://img.shields.io/pypi/pyversions/skyward" alt="Python"></a>
  <a href="https://github.com/gabfssilva/skyward/blob/main/LICENSE"><img src="https://img.shields.io/github/license/gabfssilva/skyward" alt="License"></a>
</p>

---

<p align="center">
  <img src="https://github.com/gabfssilva/skyward/blob/main/docs/demo.gif?raw=true" alt="Skyward Demo" width="800">
</p>

Skyward is a Python library for ephemeral accelerator compute. Spin up cloud accelerators, run your code, and tear them down automatically. No infrastructure to manage, no idle costs.

## Quick Example

```python
import skyward as sky

@sky.function
def train(epochs: int) -> dict:
    import torch

    model = torch.nn.Linear(100, 10).cuda()
    optimizer = torch.optim.Adam(model.parameters())

    for epoch in range(epochs):
        loss = model(torch.randn(32, 100, device="cuda")).sum()
        loss.backward()
        optimizer.step()

    return { "final_loss": loss.item() }


with sky.Compute(
    provider=sky.AWS(), 
    accelerator=sky.accelerators.T4(), 
    image=sky.Image(pip=["torch"])
) as compute:
    result = train(epochs=100) >> compute
    print(result)
```

## Features

- **[A single API, any cloud](https://gabfssilva.github.io/skyward/concepts/)** — A unified declarative API to run functions on AWS, GCP, Hyperstack, RunPod, TensorDock, VastAI, Verda, and more.
- **[Operators, not boilerplate](https://gabfssilva.github.io/skyward/concepts/)** — `>>` executes on one node, `@` broadcasts to all, `&` runs in parallel. No job configs, no YAML.
- **[Ephemeral by default](https://gabfssilva.github.io/skyward/concepts/)** — Instances provision on demand and terminate automatically. Context managers guarantee cleanup.
- **[Multi-provider support](https://gabfssilva.github.io/skyward/providers/)** — AWS, GCP, Hyperstack, RunPod, TensorDock, VastAI, Verda with automatic fallback and cost optimization.
- **[Distributed training](https://gabfssilva.github.io/skyward/distributed-training/)** — PyTorch DDP, Keras 3, JAX, TensorFlow, and HuggingFace integration decorators.
- **[Distributed collections](https://gabfssilva.github.io/skyward/distributed-collections/)** — Dict, set, counter, queue, barrier, and lock replicated across the cluster.
- **[Spot-aware](https://gabfssilva.github.io/skyward/providers/)** — Automatic spot instance selection, preemption detection, and replacement. Save 60-90% on compute costs.

## Install

```bash
uv add skyward
```

## Requirements

- Python 3.12+
- Cloud provider credentials ([setup guide](https://gabfssilva.github.io/skyward/getting-started/))

## Documentation

Full documentation at **[gabfssilva.github.io/skyward](https://gabfssilva.github.io/skyward/)**.

## License

MIT
