styly-netsync-server


Namestyly-netsync-server JSON
Version 0.0.4 PyPI version JSON
download
home_pageNone
SummarySTYLY NetSync Server - Multiplayer framework for Location-Based Entertainment VR/MR experiences
upload_time2025-08-17 08:30:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache-2.0
keywords unity multiplayer vr mr location-based-entertainment real-time zeromq networking
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # STYLY NetSync Server

A Unity-based multiplayer framework for Location-Based Entertainment (LBE) VR/AR experiences. Provides real-time synchronization of player positions, hand tracking, and virtual objects using a Python server with ZeroMQ networking and binary serialization.

## Installation

### From PyPI (when published)
```bash
pip install styly-netsync-server
```

### From Source
```bash
# Clone the repository
git clone https://github.com/PsychicVRLab/STYLY-LBE-Multiplayer.git
cd STYLY-LBE-Multiplayer/STYLY-NetSync-Server

# Install in development mode
pip install -e .
```

### Using uv (recommended)
```bash
# Run without installing (one-time use)
uvx styly-netsync-server

# Run with custom options
uvx styly-netsync-server --dealer-port 5555 --pub-port 5556

# Run with uv (automatically installs dependencies)
uv run dev  # Convenience script for development
```

## Usage

### Command Line

Start the server with default settings:
```bash
styly-netsync-server
```

Start with custom configuration:
```bash
styly-netsync-server --dealer-port 5555 --pub-port 5556 --beacon-port 9999 --name "My-Server"
```

Disable UDP discovery:
```bash
styly-netsync-server --no-beacon
```

### Programmatic Usage

```python
from styly_netsync import NetSyncServer
import time

# Create and start server
server = NetSyncServer(
    dealer_port=5555,
    pub_port=5556,
    enable_beacon=True,
    beacon_port=9999,
    server_name="STYLY-NetSync-Server"
)

try:
    server.start()
    # Keep server running
    while True:
        time.sleep(1)
except KeyboardInterrupt:
    server.stop()
```

### Client Simulator

Test the server with simulated clients:
```bash
# Simulate 100 clients
styly-netsync-simulator --clients 100

# Custom server and room
styly-netsync-simulator --server tcp://localhost --room my_room --clients 50
```

## Architecture

- **Binary Protocol**: Efficient ZeroMQ-based networking with ~60% bandwidth reduction vs JSON
- **Threading Model**: Separate threads for receive, periodic broadcast, and cleanup operations
- **Client Management**: Device ID to client number mapping with automatic cleanup
- **Network Variables**: Synchronized key-value storage with conflict resolution
- **RPC System**: Remote procedure calls for custom game logic

## Dependencies

- Python 3.8+
- pyzmq >= 26.0.0

## Development

### Testing During Development

There are several ways to test the server during development:

#### 1. Install in Development Mode
```bash
# Install the package in editable mode
pip install -e .

# Run the server
styly-netsync-server
```

#### 2. Run Directly as Python Module
```bash
# From the project root
python -m styly_netsync

# With custom options
python -m styly_netsync --dealer-port 6000 --pub-port 6001
```

#### 3. Use uv for Development
```bash
# Run using convenience script (automatically installs dependencies)
uv run dev

# Run with custom options
uv run dev --dealer-port 6000 --pub-port 6001

# Use uvx for one-time execution without installation
uvx --from . styly-netsync-server

# Test with client simulator
uvx --from . styly-netsync-simulator --clients 50
```

#### 4. Create Test Scripts
```python
# test_server.py
from src.styly_netsync import NetSyncServer

server = NetSyncServer(dealer_port=5555, pub_port=5556)
try:
    server.start()
    print("Server is running. Press Ctrl+C to stop.")
    while True:
        pass
except KeyboardInterrupt:
    server.stop()
```

#### 5. Use the Test Client
```bash
# Start the server first
styly-netsync-server

# In another terminal, run the test client
python test_client.py
```

#### 6. Load Testing with Client Simulator
```bash
# Start server
styly-netsync-server

# In another terminal, simulate multiple clients
styly-netsync-simulator --clients 100 --room test_room

# Monitor server logs for performance metrics
```

### Code Quality

```bash
# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/ tests/

# Lint code
ruff src/ tests/

# Type check
mypy src/
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "styly-netsync-server",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "unity, multiplayer, vr, mr, location-based-entertainment, real-time, zeromq, networking",
    "author": null,
    "author_email": "\"STYLY, Inc.\" <info@styly.inc>",
    "download_url": "https://files.pythonhosted.org/packages/dc/a0/3e2e90199a40b09f10b5286fde6b3e25f193c65236ced77fa504e7ab064b/styly_netsync_server-0.0.4.tar.gz",
    "platform": null,
    "description": "# STYLY NetSync Server\n\nA Unity-based multiplayer framework for Location-Based Entertainment (LBE) VR/AR experiences. Provides real-time synchronization of player positions, hand tracking, and virtual objects using a Python server with ZeroMQ networking and binary serialization.\n\n## Installation\n\n### From PyPI (when published)\n```bash\npip install styly-netsync-server\n```\n\n### From Source\n```bash\n# Clone the repository\ngit clone https://github.com/PsychicVRLab/STYLY-LBE-Multiplayer.git\ncd STYLY-LBE-Multiplayer/STYLY-NetSync-Server\n\n# Install in development mode\npip install -e .\n```\n\n### Using uv (recommended)\n```bash\n# Run without installing (one-time use)\nuvx styly-netsync-server\n\n# Run with custom options\nuvx styly-netsync-server --dealer-port 5555 --pub-port 5556\n\n# Run with uv (automatically installs dependencies)\nuv run dev  # Convenience script for development\n```\n\n## Usage\n\n### Command Line\n\nStart the server with default settings:\n```bash\nstyly-netsync-server\n```\n\nStart with custom configuration:\n```bash\nstyly-netsync-server --dealer-port 5555 --pub-port 5556 --beacon-port 9999 --name \"My-Server\"\n```\n\nDisable UDP discovery:\n```bash\nstyly-netsync-server --no-beacon\n```\n\n### Programmatic Usage\n\n```python\nfrom styly_netsync import NetSyncServer\nimport time\n\n# Create and start server\nserver = NetSyncServer(\n    dealer_port=5555,\n    pub_port=5556,\n    enable_beacon=True,\n    beacon_port=9999,\n    server_name=\"STYLY-NetSync-Server\"\n)\n\ntry:\n    server.start()\n    # Keep server running\n    while True:\n        time.sleep(1)\nexcept KeyboardInterrupt:\n    server.stop()\n```\n\n### Client Simulator\n\nTest the server with simulated clients:\n```bash\n# Simulate 100 clients\nstyly-netsync-simulator --clients 100\n\n# Custom server and room\nstyly-netsync-simulator --server tcp://localhost --room my_room --clients 50\n```\n\n## Architecture\n\n- **Binary Protocol**: Efficient ZeroMQ-based networking with ~60% bandwidth reduction vs JSON\n- **Threading Model**: Separate threads for receive, periodic broadcast, and cleanup operations\n- **Client Management**: Device ID to client number mapping with automatic cleanup\n- **Network Variables**: Synchronized key-value storage with conflict resolution\n- **RPC System**: Remote procedure calls for custom game logic\n\n## Dependencies\n\n- Python 3.8+\n- pyzmq >= 26.0.0\n\n## Development\n\n### Testing During Development\n\nThere are several ways to test the server during development:\n\n#### 1. Install in Development Mode\n```bash\n# Install the package in editable mode\npip install -e .\n\n# Run the server\nstyly-netsync-server\n```\n\n#### 2. Run Directly as Python Module\n```bash\n# From the project root\npython -m styly_netsync\n\n# With custom options\npython -m styly_netsync --dealer-port 6000 --pub-port 6001\n```\n\n#### 3. Use uv for Development\n```bash\n# Run using convenience script (automatically installs dependencies)\nuv run dev\n\n# Run with custom options\nuv run dev --dealer-port 6000 --pub-port 6001\n\n# Use uvx for one-time execution without installation\nuvx --from . styly-netsync-server\n\n# Test with client simulator\nuvx --from . styly-netsync-simulator --clients 50\n```\n\n#### 4. Create Test Scripts\n```python\n# test_server.py\nfrom src.styly_netsync import NetSyncServer\n\nserver = NetSyncServer(dealer_port=5555, pub_port=5556)\ntry:\n    server.start()\n    print(\"Server is running. Press Ctrl+C to stop.\")\n    while True:\n        pass\nexcept KeyboardInterrupt:\n    server.stop()\n```\n\n#### 5. Use the Test Client\n```bash\n# Start the server first\nstyly-netsync-server\n\n# In another terminal, run the test client\npython test_client.py\n```\n\n#### 6. Load Testing with Client Simulator\n```bash\n# Start server\nstyly-netsync-server\n\n# In another terminal, simulate multiple clients\nstyly-netsync-simulator --clients 100 --room test_room\n\n# Monitor server logs for performance metrics\n```\n\n### Code Quality\n\n```bash\n# Install development dependencies\npip install -e \".[dev]\"\n\n# Run tests\npytest\n\n# Format code\nblack src/ tests/\n\n# Lint code\nruff src/ tests/\n\n# Type check\nmypy src/\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "STYLY NetSync Server - Multiplayer framework for Location-Based Entertainment VR/MR experiences",
    "version": "0.0.4",
    "project_urls": {
        "Documentation": "https://github.com/styly-dev/STYLY-NetSync/blob/main/README.md",
        "Homepage": "https://styly.inc",
        "Issues": "https://github.com/styly-dev/STYLY-NetSync/issues",
        "Repository": "https://github.com/styly-dev/STYLY-NetSync"
    },
    "split_keywords": [
        "unity",
        " multiplayer",
        " vr",
        " mr",
        " location-based-entertainment",
        " real-time",
        " zeromq",
        " networking"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a6975ba7ece51ad8101c7e455169c41bb997442aec4e612aa866eece05e2d34e",
                "md5": "8843ea6a7db69a6d3b4d1a729e10e423",
                "sha256": "efb9c360214876a639ccebcd85072616c022a36de8344263cdb5352af4e80085"
            },
            "downloads": -1,
            "filename": "styly_netsync_server-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8843ea6a7db69a6d3b4d1a729e10e423",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 30393,
            "upload_time": "2025-08-17T08:30:23",
            "upload_time_iso_8601": "2025-08-17T08:30:23.272138Z",
            "url": "https://files.pythonhosted.org/packages/a6/97/5ba7ece51ad8101c7e455169c41bb997442aec4e612aa866eece05e2d34e/styly_netsync_server-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dca03e2e90199a40b09f10b5286fde6b3e25f193c65236ced77fa504e7ab064b",
                "md5": "77962f7b78f81098702ac8e7b65c692e",
                "sha256": "12f790bec3499f9b7df142c56ecf5cb5cd1fbc1996412edc20986428ebd30aff"
            },
            "downloads": -1,
            "filename": "styly_netsync_server-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "77962f7b78f81098702ac8e7b65c692e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 35071,
            "upload_time": "2025-08-17T08:30:24",
            "upload_time_iso_8601": "2025-08-17T08:30:24.884200Z",
            "url": "https://files.pythonhosted.org/packages/dc/a0/3e2e90199a40b09f10b5286fde6b3e25f193c65236ced77fa504e7ab064b/styly_netsync_server-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-17 08:30:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "styly-dev",
    "github_project": "STYLY-NetSync",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "styly-netsync-server"
}
        
Elapsed time: 1.26872s