STYLY NetSync Server - Multiplayer framework for Location-Based Entertainment VR/MR experiences
Project description
Prepare develop environment
Option A: Use Dev Container (Recommended)
Prerequisites
- VS Code, Docker
- Dev Container extension
Open Dev Container
Click the >< icon in the bottom-left corner of the window.
(Or press Cmd + Shift + P) and select Dev Containers: Reopen in Container.
Option B:
Prerequisites
- Python >=3.11
- uv
Install styly-netsync-server in development mode
pip install -e .
Usage — STYLY NetSync server & CLIs
When you install the package with pip install -e . (editable / development mode), changes to the package's Python source files in your working tree are reflected immediately when you run the commands below — you don't need to reinstall.
# Start STYLY NetSync Server
styly-netsync-server
# Simulate 50 clients
styly-netsync-simulator --clients 50
# Custom server and room
styly-netsync-simulator --server tcp://localhost --room my_room --clients 50
Logging
File output: add --log-dir DIR to write JSON lines to DIR/netsync-server.log (DEBUG level).
# output logs at ./logs directory
styly-netsync-simulator --log-dir logs
Console output: human-friendly text by default. Use --log-json-console for JSON and --log-level-console LEVEL to change the level.
Rotation & retention: default is 10 MB or 7 days, keeping the newest 20 files. Override with --log-rotation / --log-retention (loguru syntax like "10 MB", "1 day", "keep 5 files").
Bridging: stdlib logging is routed to loguru automatically.
REST bridge for client variables
Starting with this version the server launches an embedded FastAPI application that exposes a REST endpoint for pre-seeding and updating per-client Network Variables by deviceId.
- Endpoint:
POST /v1/rooms/{roomId}/devices/{deviceId}/client-variables - Default port:
8800(override with environment variableNETSYNC_REST_PORT) - Payload body:
{
"vars": {
"name": "Jack",
"lang": "EN"
}
}
- Constraints enforced by the bridge:
- Variable names: 1–64 characters
- Values: up to 1024 characters
- Total variables per client: 20 (additional keys return HTTP 409)
- Behavior:
- If a device has not connected yet, the values are queued in an in-memory preseed store and automatically applied once the server assigns a
clientNo. - If the device is already connected, the variables are sent immediately through the existing ZeroMQ pathway.
- If a device has not connected yet, the values are queued in an in-memory preseed store and automatically applied once the server assigns a
- Typical usage (curl example):
curl -sS -X POST "http://127.0.0.1:8800/v1/rooms/default_room/devices/00000000-0000-0000-0000-000000000000/client-variables" \
-H "Content-Type: application/json" \
-d '{"vars":{"name":"Jack","lang":"EN"}}'
The response includes the current mapping status (clientNo or null) and whether each key was queued or applied.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file styly_netsync_server-0.7.2.tar.gz.
File metadata
- Download URL: styly_netsync_server-0.7.2.tar.gz
- Upload date:
- Size: 69.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
957b99f3de2da86a97c1d8d50d2431a14ac3589f5fd87a61c500d5bfdd09bc30
|
|
| MD5 |
00b82f2063f720e2aabe338a5a8893a1
|
|
| BLAKE2b-256 |
ca2f131b4e46ba042a51977572ea710326380ba23f21ded171de74e835a1632b
|
Provenance
The following attestation bundles were made for styly_netsync_server-0.7.2.tar.gz:
Publisher:
publish-to-pypi.yml on styly-dev/STYLY-NetSync
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
styly_netsync_server-0.7.2.tar.gz -
Subject digest:
957b99f3de2da86a97c1d8d50d2431a14ac3589f5fd87a61c500d5bfdd09bc30 - Sigstore transparency entry: 814558862
- Sigstore integration time:
-
Permalink:
styly-dev/STYLY-NetSync@8470c6dc1171a8e5e1b91473bcf8391aa9f9100e -
Branch / Tag:
refs/tags/v0.7.2 - Owner: https://github.com/styly-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@8470c6dc1171a8e5e1b91473bcf8391aa9f9100e -
Trigger Event:
release
-
Statement type:
File details
Details for the file styly_netsync_server-0.7.2-py3-none-any.whl.
File metadata
- Download URL: styly_netsync_server-0.7.2-py3-none-any.whl
- Upload date:
- Size: 63.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ee0fea3594bcbb8a54f42944c2d628e280e0b27e30b7498bd0749266925d029
|
|
| MD5 |
087d9fce4c0de40c9e4eac19dea6ba60
|
|
| BLAKE2b-256 |
a544750a846b8d1a9511d50267bdf038c09262ece4791b6eb25821672db14b29
|
Provenance
The following attestation bundles were made for styly_netsync_server-0.7.2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on styly-dev/STYLY-NetSync
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
styly_netsync_server-0.7.2-py3-none-any.whl -
Subject digest:
7ee0fea3594bcbb8a54f42944c2d628e280e0b27e30b7498bd0749266925d029 - Sigstore transparency entry: 814558864
- Sigstore integration time:
-
Permalink:
styly-dev/STYLY-NetSync@8470c6dc1171a8e5e1b91473bcf8391aa9f9100e -
Branch / Tag:
refs/tags/v0.7.2 - Owner: https://github.com/styly-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@8470c6dc1171a8e5e1b91473bcf8391aa9f9100e -
Trigger Event:
release
-
Statement type: