Metadata-Version: 2.4
Name: skyward
Version: 0.5.2
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: aiohttp>=3.13.3
Requires-Dist: asyncssh>=2.22.0
Requires-Dist: casty==0.20.1
Requires-Dist: cloudpickle>=3.1.2
Requires-Dist: loky>=3.5
Requires-Dist: lz4>=4.4.0
Requires-Dist: pydantic>=2.12.5
Requires-Dist: rich>=14.3.2
Provides-Extra: all
Requires-Dist: accelerate>=1.12.0; extra == 'all'
Requires-Dist: aioboto3>=13.0.0; extra == 'all'
Requires-Dist: boto3-stubs[ec2,ecr,iam,s3,sts]>=1.35.0; extra == 'all'
Requires-Dist: datasets>=4.4.1; extra == 'all'
Requires-Dist: google-auth>=2.0.0; extra == 'all'
Requires-Dist: google-cloud-compute>=1.20.0; extra == 'all'
Requires-Dist: google-cloud-tpu>=1.25.0; extra == 'all'
Requires-Dist: torch==2.8.0; extra == 'all'
Requires-Dist: torchvision==0.23.0; extra == 'all'
Requires-Dist: transformers>=4.57.3; extra == 'all'
Provides-Extra: aws
Requires-Dist: aioboto3>=13.0.0; extra == 'aws'
Requires-Dist: boto3-stubs[ec2,ecr,iam,s3,sts]>=1.35.0; extra == 'aws'
Provides-Extra: dev
Requires-Dist: boto3-stubs[ec2,ecr,iam,s3,ssm,sts]>=1.42.3; extra == 'dev'
Requires-Dist: jax>=0.8.1; extra == 'dev'
Requires-Dist: keras>=3.12.0; extra == 'dev'
Requires-Dist: mypy>=1.13; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Requires-Dist: torch>=2.8.0; extra == 'dev'
Provides-Extra: gcp
Requires-Dist: google-auth>=2.0.0; extra == 'gcp'
Requires-Dist: google-cloud-compute>=1.20.0; extra == 'gcp'
Requires-Dist: google-cloud-tpu>=1.25.0; extra == 'gcp'
Provides-Extra: huggingface
Requires-Dist: accelerate>=1.12.0; extra == 'huggingface'
Requires-Dist: datasets>=4.4.1; extra == 'huggingface'
Requires-Dist: transformers>=4.57.3; extra == 'huggingface'
Provides-Extra: pandas
Requires-Dist: pandas==2.3.3; extra == 'pandas'
Provides-Extra: providers
Requires-Dist: aioboto3>=13.0.0; extra == 'providers'
Requires-Dist: boto3-stubs[ec2,ecr,iam,s3,sts]>=1.35.0; extra == 'providers'
Requires-Dist: google-auth>=2.0.0; extra == 'providers'
Requires-Dist: google-cloud-compute>=1.20.0; extra == 'providers'
Requires-Dist: google-cloud-tpu>=1.25.0; extra == 'providers'
Provides-Extra: pytorch
Requires-Dist: torch==2.8.0; extra == 'pytorch'
Requires-Dist: torchvision==0.23.0; extra == 'pytorch'
Description-Content-Type: text/markdown

<p align="center">
  <img src="docs/logo_sky.png" 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>

---

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.compute
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.ComputePool(provider=sky.AWS(), accelerator="T4", image=sky.Image(pip=["torch"])) as pool:
    result = train(epochs=100) >> pool
    print(result)
```

## Features

- **[One decorator, any cloud](https://gabfssilva.github.io/skyward/concepts/)** — `@compute` makes any function remotely executable. AWS, RunPod, VastAI, and Verda with a unified API.
- **[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, RunPod, 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
