Metadata-Version: 2.4
Name: alenia-nerve
Version: 1.4.8
Summary: Ultra-fast cross-platform local IPC engine for sovereign game developers.
Author-email: Alenia Studios <contact.aleniastudios@gmail.com>
License: GNU General Public License v3 (GPL v3)
Project-URL: Homepage, https://github.com/Kaia-Alenia/alenia-nerve
Project-URL: Bug Tracker, https://github.com/Kaia-Alenia/alenia-nerve/issues
Project-URL: Source Code, https://github.com/Kaia-Alenia/alenia-nerve
Keywords: ipc,inter-process communication,sockets,unix domain sockets,game development,local network,alenia,nerve,hub,client
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Networking
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-timeout; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"

# Alenia Nerve — Python Client & CLI Hub

[![PyPI Version](https://img.shields.io/pypi/v/alenia-nerve.svg?color=blueviolet&label=PyPI)](https://pypi.org/project/alenia-nerve/)
[![PyPI Downloads](https://img.shields.io/pypi/dm/alenia-nerve.svg?color=blueviolet&label=Downloads%2Fmo)](https://pypi.org/project/alenia-nerve/)
[![Python](https://img.shields.io/badge/Python-3.10%2B-indigo.svg)](#)
[![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows-blueviolet.svg)](#)
[![License: GPL-3.0](https://img.shields.io/badge/License-GPLv3-blue.svg)](../../LICENSE)
[![Ko-fi](https://img.shields.io/badge/Support%20on-Ko--fi-FF5E5B.svg)](https://ko-fi.com/aleniastudios)

This is the official Python client library and Command Line Interface (CLI) for Alenia Nerve, the ultra-fast local inter-process communication (IPC) engine.

## The Nerve CLI Hub

The Python package includes the central CLI tool (`nerve`) used to boot and manage the central IPC routing Hub.

<div align="center">
  <img src="../../assets/python_client.svg" alt="Nerve Hub Console" width="100%">
</div>

### Running the Hub

Once installed, you can start the central hub from any terminal window:

```bash
nerve start
```

For detailed packet routing output, run the hub in verbose mode:

```bash
nerve start --verbose
```

---

## Client Installation

Install the package via pip:

```bash
pip install alenia-nerve
```

Or install it globally bypassing system package restrictions if needed (e.g., inside containers):

```bash
pip install alenia-nerve --break-system-packages
```

---

## Integration Example

### 1. Initialize Client
Connect to the local hub by registering a unique client ID.

```python
from nerve import NexusClient

client = NexusClient()
client.connect("my_python_node")
```

### 2. Send messages
Send a JSON-serializable payload directly to another registered node:

```python
payload = {"status": "processing", "progress": 45}
client.send("renderer_node", payload)
```

### 3. Broadcast messages
Broadcast a payload to every other node currently connected to the Hub:

```python
client.broadcast({"event": "reload_assets"})
```

### 4. Listen for streams
Register a callback function to listen to data streams in real-time:

```python
def handle_incoming(data):
    print(f"Received: {data}")

client.listen(handle_incoming)
```

---

## License

This software is distributed under the GNU General Public License v3 (GPL v3).
