Metadata-Version: 2.1
Name: easyremote
Version: 0.1.0.2.3
Summary: Easy remote function execution framework
Author-email: "Silan.Hu" <silan.hu@u.nus.edu>
License: MIT License
        
        Copyright (c) 2024 Silan Hu
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/Qingbolan/easyremote
Project-URL: Bug Tracker, https://github.com/Qingbolan/EasyRemote/issues
Project-URL: Repository, https://github.com/Qingbolan/EasyRemote.git
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Information Technology
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Framework :: AsyncIO
Classifier: Natural Language :: English
Classifier: Natural Language :: Chinese (Simplified)
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE.md
Requires-Dist: grpcio >=1.68.1
Requires-Dist: protobuf >=5.29.0
Requires-Dist: uvicorn >=0.32.1
Requires-Dist: python-multipart >=0.0.19
Requires-Dist: rich >=13.0.0

# EasyRemote

<div align="center">

![EasyRemote Logo](https://raw.githubusercontent.com/Qingbolan/EasyRemote/master/docs/easyremote-logo.png)

[![PyPI version](https://badge.fury.io/py/easyremote.svg)](https://badge.fury.io/py/easyremote)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python Version](https://img.shields.io/pypi/pyversions/easyremote)]()

*A lightweight framework for hassle-free remote computing resource sharing.*

English | [中文](https://github.com/Qingbolan/EasyRemote/blob/main/README_zh.md)

</div>

## Why EasyRemote?

Are you tired of:

- Paying expensive cloud GPU fees for AI development?
- Struggling with complex deployment for demos?
- Looking for ways to share computing resources within your team?

EasyRemote lets you expose local computing resources (AI models, data processing functions) as remote services with just a few lines of code. All you need is a cheap VPS!

```python
# It's as simple as this:
from easyremote import ComputeNode

# Initialize ComputeNode with VPS address and unique node ID
node = ComputeNode(
    vps_address="your-vps-ip:8080",
    node_id="basic-compute"
)

@node.register
def run_model(input_data):
    return your_ai_model(input_data)  # Executes on your local GPU

if __name__ == "__main__":
    node.serve()
```

## Features

- 🚀 **Super Simple**: Turn any function into a remote service with a single decorator
- 💰 **Cost-Effective**: Use your local GPU through an inexpensive VPS
- 🔒 **Private & Secure**: All computation stays on your local machine
- 🌐 **Flexible Deployment**: Perfect for demos, prototypes, and team collaboration

## Quick Start

### 1. Installation

```bash
pip install easyremote
```

### 2. Set Up VPS (Gateway&&Call)

```python
from easyremote import Server

app = FastAPI()
server = Server(port=8080)

@remote(node_id="basic-compute")
def add(a: int, b: int) -> int:
    pass
```

### 3. Configure Local Node

```python
from easyremote import ComputeNode

# Connect to your VPS
node = ComputeNode("your-vps-ip:8080")

# Define your remote functions
@node.register
def process_data(data):
    return heavy_computation(data)  # Runs locally

# Start serving
node.serve()
```

## Advanced Usage

### Async Support

```python
@node.register(async_func=True)
async def async_process(data):
    result = await complex_async_operation(data)
    return result
```

### Streaming Results

```python
@node.register(stream=True)
def stream_results(data):
    for chunk in process_large_dataset(data):
        yield chunk
```

### Real-world Examples

Check out our [examples](./examples/) directory for:

- AI Model Serving
- Data Pipeline Processing
- Team Resource Sharing
- And more!

## Architecture

```
Client -> VPS (Gateway) -> Local Compute Node
                       -> Local Compute Node
                       -> Local Compute Node
```

## Performance

- Efficient binary protocol
- Support for large data transfer
- Automatic connection management

## Roadmap

- [ ] Rewrite Distributed Network Using Go's Kitex Framework
- [ ] Multi-node clustering support
- [ ] Enhanced security features
- [ ] Web-based management UI
- [ ] More language SDKs
- [ ] Docker support

## Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md)

## License

[MIT License](LICENSE)

## Contact & Support

- Author: Silan Hu
- Email: silan.hu@u.nus.edu
- GitHub: [Qingbolan](https://github.com/Qingbolan)

## Acknowledgments

Special thanks to all contributors who have helped make EasyRemote better!

---

<div align="center">
*If you find EasyRemote useful, please consider giving it a star ⭐*

</div>
