Metadata-Version: 2.4
Name: targon-sdk
Version: 1.0.0
Summary: Targon SDK to interact with Targon rentals and serverless
Author-email: Manifold Labs <dev@manifold.inc>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/manifold-inc/targon-sdk
Project-URL: Source, https://github.com/manifold-inc/targon-sdk
Project-URL: Issues, https://github.com/manifold-inc/targon-sdk/issues
Keywords: api,sdk,targon
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28
Requires-Dist: click>=8.0
Requires-Dist: keyring>=25.6.0
Requires-Dist: rich>=14.1.0
Requires-Dist: aiohttp>=3.8
Requires-Dist: cloudpickle>=2.0
Requires-Dist: PyYAML>=6.0
Requires-Dist: grpcio>=1.60.0
Requires-Dist: grpcio-health-checking>=1.60.0
Requires-Dist: protobuf>=4.25.0
Provides-Extra: dev
Requires-Dist: black>=24.0; extra == "dev"
Requires-Dist: flake8>=6.0; extra == "dev"
Requires-Dist: isort>=6.0; extra == "dev"
Requires-Dist: mypy>=1.5; extra == "dev"
Requires-Dist: grpcio-tools>=1.60.0; extra == "dev"
Dynamic: license-file

<h1 align="center">
  <img src="https://targon.com/targon-logo.svg" alt="Targon" width="32" style="vertical-align: bottom;">
  Targon SDK
</h1>

<p align="center">
  <strong>Build and deploy serverless Python on GPUs — in seconds, not hours.</strong>
</p>


<p align="center">
   | <a href="#installation"><b>Install</b></a> |
   <a href="#getting-started"><b>Getting Started</b></a> |
   <a href="https://github.com/manifold-inc/targon-sdk/tree/main/examples"><b>Examples</b></a> |
   <a href="https://docs.targon.com/sdk/app"><b>Documentation</b></a> |
</p>


<p align="center">
  <img alt="Status" src="https://img.shields.io/badge/status-stable-brightgreen">
  <a href="https://pypi.org/project/targon-sdk/"><img alt="PyPI" src="https://img.shields.io/pypi/v/targon-sdk?color=blue&label=PyPI"></a>
  <img alt="Python" src="https://img.shields.io/badge/python-3.9+-orange">
  <a href="https://github.com/manifold-inc/targon-sdk/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/manifold-inc/targon-sdk"></a>
</p>



## About

Targon SDK is a Python framework for building and deploying serverless applications on the Targon platform. Define your app, decorate your functions, and deploy — the SDK handles containers, scaling, and infrastructure.

- **Zero infrastructure** — No containers to build, no clusters to manage
- **GPU-first** — H100, H200, and more. Request with `resource="h200-small"`
- **Web endpoints** — `@targon.fastapi_endpoint()` turns functions into APIs
- **Scales to zero** — Pay only when your code runs
- **Custom images** — Build containers in Python with `pip_install()`, `env()`, and more

> **Stability:** The Targon SDK follows semantic versioning. Breaking changes
> are only introduced in major releases.

## Installation

**Requires Python 3.9+**

```bash
pip install targon-sdk
```

**Install from source**
```bash
git clone https://github.com/manifold-inc/targon-sdk.git
cd targon-sdk
pip install -e .
```

## Getting Started

```python
import targon

app = targon.App("hello-world", image=targon.Image.debian_slim())

@app.function(resource=targon.Compute.CPU_SMALL)
def greet(name: str) -> str:
    return f"Hello, {name}!"

@app.local_entrypoint()
def main():
    print(greet.remote("World"))
```

```bash
# Authenticate
targon setup

# Run remotely
targon run hello.py

# Deploy as a service
targon deploy hello.py
```

## Contributing

We welcome contributions! Please see our contributing guidelines before submitting PRs.
1. Fork the repository
2. Create a feature branch
3. Make your changes with tests
4. Submit a pull request


## Changelog
See [CHANGELOG.md](CHANGELOG.md) for release notes.


## License
Apache 2.0 — see [LICENSE](LICENSE) for details.
