styly-mdm 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- styly_mdm-0.2.1/PKG-INFO +71 -0
- styly_mdm-0.2.1/README.md +44 -0
- styly_mdm-0.2.1/pyproject.toml +58 -0
- styly_mdm-0.2.1/run.sh +39 -0
- styly_mdm-0.2.1/setup.cfg +4 -0
- styly_mdm-0.2.1/styly_mdm/__init__.py +18 -0
- styly_mdm-0.2.1/styly_mdm/__main__.py +6 -0
- styly_mdm-0.2.1/styly_mdm/server.py +1156 -0
- styly_mdm-0.2.1/styly_mdm/static/index.html +1126 -0
- styly_mdm-0.2.1/styly_mdm.egg-info/PKG-INFO +71 -0
- styly_mdm-0.2.1/styly_mdm.egg-info/SOURCES.txt +14 -0
- styly_mdm-0.2.1/styly_mdm.egg-info/dependency_links.txt +1 -0
- styly_mdm-0.2.1/styly_mdm.egg-info/entry_points.txt +2 -0
- styly_mdm-0.2.1/styly_mdm.egg-info/requires.txt +4 -0
- styly_mdm-0.2.1/styly_mdm.egg-info/top_level.txt +1 -0
- styly_mdm-0.2.1/tests/test_app.py +75 -0
styly_mdm-0.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: styly-mdm
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Lightweight MDM control server for LBE VR headsets (PICO), with a web console and LAN discovery.
|
|
5
|
+
Author: STYLY, Inc.
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/styly-dev/STYLY-MDM
|
|
8
|
+
Project-URL: Repository, https://github.com/styly-dev/STYLY-MDM
|
|
9
|
+
Project-URL: Issues, https://github.com/styly-dev/STYLY-MDM/issues
|
|
10
|
+
Keywords: mdm,vr,pico,lbe,device-management,aiohttp
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Web Environment
|
|
13
|
+
Classifier: Framework :: aiohttp
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: System :: Systems Administration
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: aiohttp<4,>=3.9
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
27
|
+
|
|
28
|
+
# styly-mdm
|
|
29
|
+
|
|
30
|
+
The control server for **STYLY-MDM** — a lightweight Mobile Device Management
|
|
31
|
+
system for Location Based Experience (LBE) VR headsets. It bridges PICO VR HMDs
|
|
32
|
+
and a browser-based admin console, letting you launch apps and install APKs on
|
|
33
|
+
many headsets at once over the LAN.
|
|
34
|
+
|
|
35
|
+
> STYLY-MDM is designed for use within a local area network (LAN). It has no
|
|
36
|
+
> authentication. **Do not expose the server to the public internet.**
|
|
37
|
+
|
|
38
|
+
## Install & run
|
|
39
|
+
|
|
40
|
+
Run without cloning the repository:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# One-off, no install (recommended):
|
|
44
|
+
uvx styly-mdm
|
|
45
|
+
|
|
46
|
+
# Or install, then run:
|
|
47
|
+
pip install styly-mdm
|
|
48
|
+
styly-mdm
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The server starts on port **7070** and prints its LAN IP addresses. Open
|
|
52
|
+
`http://<server-ip>:7070` in a browser for the web console. Devices on the LAN
|
|
53
|
+
discover the server automatically via UDP broadcast (port **7071**).
|
|
54
|
+
|
|
55
|
+
## Configuration
|
|
56
|
+
|
|
57
|
+
| Option | Env var | Flag | Default |
|
|
58
|
+
|--------|---------|------|---------|
|
|
59
|
+
| HTTP/WebSocket port | `MDM_WS_PORT` | `--port` | `7070` |
|
|
60
|
+
| UDP discovery port | `MDM_DISCOVERY_PORT` | — | `7071` |
|
|
61
|
+
| Data directory (uploaded APKs + device registry) | `MDM_DATA_DIR` | `--data-dir` | current directory |
|
|
62
|
+
|
|
63
|
+
Uploaded APKs are written to `<data-dir>/apks/` and the persistent device
|
|
64
|
+
registry to `<data-dir>/device_registry.json`.
|
|
65
|
+
|
|
66
|
+
You can also start it as a module: `python -m styly_mdm`.
|
|
67
|
+
|
|
68
|
+
## Documentation
|
|
69
|
+
|
|
70
|
+
Full documentation, protocol references, and the Android MDM client live in the
|
|
71
|
+
project repository: <https://github.com/styly-dev/STYLY-MDM>.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# styly-mdm
|
|
2
|
+
|
|
3
|
+
The control server for **STYLY-MDM** — a lightweight Mobile Device Management
|
|
4
|
+
system for Location Based Experience (LBE) VR headsets. It bridges PICO VR HMDs
|
|
5
|
+
and a browser-based admin console, letting you launch apps and install APKs on
|
|
6
|
+
many headsets at once over the LAN.
|
|
7
|
+
|
|
8
|
+
> STYLY-MDM is designed for use within a local area network (LAN). It has no
|
|
9
|
+
> authentication. **Do not expose the server to the public internet.**
|
|
10
|
+
|
|
11
|
+
## Install & run
|
|
12
|
+
|
|
13
|
+
Run without cloning the repository:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# One-off, no install (recommended):
|
|
17
|
+
uvx styly-mdm
|
|
18
|
+
|
|
19
|
+
# Or install, then run:
|
|
20
|
+
pip install styly-mdm
|
|
21
|
+
styly-mdm
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The server starts on port **7070** and prints its LAN IP addresses. Open
|
|
25
|
+
`http://<server-ip>:7070` in a browser for the web console. Devices on the LAN
|
|
26
|
+
discover the server automatically via UDP broadcast (port **7071**).
|
|
27
|
+
|
|
28
|
+
## Configuration
|
|
29
|
+
|
|
30
|
+
| Option | Env var | Flag | Default |
|
|
31
|
+
|--------|---------|------|---------|
|
|
32
|
+
| HTTP/WebSocket port | `MDM_WS_PORT` | `--port` | `7070` |
|
|
33
|
+
| UDP discovery port | `MDM_DISCOVERY_PORT` | — | `7071` |
|
|
34
|
+
| Data directory (uploaded APKs + device registry) | `MDM_DATA_DIR` | `--data-dir` | current directory |
|
|
35
|
+
|
|
36
|
+
Uploaded APKs are written to `<data-dir>/apks/` and the persistent device
|
|
37
|
+
registry to `<data-dir>/device_registry.json`.
|
|
38
|
+
|
|
39
|
+
You can also start it as a module: `python -m styly_mdm`.
|
|
40
|
+
|
|
41
|
+
## Documentation
|
|
42
|
+
|
|
43
|
+
Full documentation, protocol references, and the Android MDM client live in the
|
|
44
|
+
project repository: <https://github.com/styly-dev/STYLY-MDM>.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77", "setuptools-scm>=8"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "styly-mdm"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Lightweight MDM control server for LBE VR headsets (PICO), with a web console and LAN discovery."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
# SPDX expression (PEP 639). The full license text lives at the repo root
|
|
12
|
+
# (../LICENSE); it is not bundled here because license-files cannot reference a
|
|
13
|
+
# path outside the package project directory.
|
|
14
|
+
license = "Apache-2.0"
|
|
15
|
+
authors = [{ name = "STYLY, Inc." }]
|
|
16
|
+
keywords = ["mdm", "vr", "pico", "lbe", "device-management", "aiohttp"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Environment :: Web Environment",
|
|
20
|
+
"Framework :: aiohttp",
|
|
21
|
+
"Intended Audience :: System Administrators",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Topic :: System :: Systems Administration",
|
|
29
|
+
]
|
|
30
|
+
dependencies = ["aiohttp>=3.9,<4"]
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
dev = ["pytest>=7"]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://github.com/styly-dev/STYLY-MDM"
|
|
37
|
+
Repository = "https://github.com/styly-dev/STYLY-MDM"
|
|
38
|
+
Issues = "https://github.com/styly-dev/STYLY-MDM/issues"
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
styly-mdm = "styly_mdm.server:main"
|
|
42
|
+
|
|
43
|
+
[tool.setuptools]
|
|
44
|
+
packages = ["styly_mdm"]
|
|
45
|
+
|
|
46
|
+
[tool.setuptools.package-data]
|
|
47
|
+
styly_mdm = ["static/*"]
|
|
48
|
+
|
|
49
|
+
# Version is derived from git tags (vX.Y.Z) — single source of truth shared with
|
|
50
|
+
# the APK release flow. The git root is the repo root, one level up from this
|
|
51
|
+
# pyproject.toml. In CI the version is injected via
|
|
52
|
+
# SETUPTOOLS_SCM_PRETEND_VERSION_FOR_STYLY_MDM so a shallow checkout needs no tags.
|
|
53
|
+
[tool.setuptools_scm]
|
|
54
|
+
root = ".."
|
|
55
|
+
fallback_version = "0.0.0"
|
|
56
|
+
# Drop the "+g<hash>" local segment: PEP 440 local versions are rejected on
|
|
57
|
+
# upload, so this keeps non-tagged (Test PyPI dry-run) builds publishable.
|
|
58
|
+
local_scheme = "no-local-version"
|
styly_mdm-0.2.1/run.sh
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
5
|
+
cd "$SCRIPT_DIR"
|
|
6
|
+
|
|
7
|
+
# --- helpers ----------------------------------------------------------------
|
|
8
|
+
info() { printf '\033[1;34m[INFO]\033[0m %s\n' "$1"; }
|
|
9
|
+
error() { printf '\033[1;31m[ERROR]\033[0m %s\n' "$1" >&2; exit 1; }
|
|
10
|
+
|
|
11
|
+
# --- prerequisite checks ----------------------------------------------------
|
|
12
|
+
command -v python >/dev/null 2>&1 || error "python not found. Please install Python 3.10+."
|
|
13
|
+
|
|
14
|
+
# --- environment ------------------------------------------------------------
|
|
15
|
+
# Usage: ./run.sh [prod|dev] (default: prod)
|
|
16
|
+
# Dev uses separate discovery/WebSocket ports so a dev server can run on the same
|
|
17
|
+
# LAN as production without the two stealing each other's clients. Keep these in
|
|
18
|
+
# sync with the client's dev flavor in mdm-client/app/build.gradle (DISCOVERY_PORT,
|
|
19
|
+
# DEFAULT_WS_PORT).
|
|
20
|
+
ENVIRONMENT="${1:-prod}"
|
|
21
|
+
|
|
22
|
+
case "$ENVIRONMENT" in
|
|
23
|
+
prod)
|
|
24
|
+
# The server falls back to the production ports (7071 / 7070) when unset.
|
|
25
|
+
;;
|
|
26
|
+
dev)
|
|
27
|
+
export MDM_DISCOVERY_PORT=7081
|
|
28
|
+
export MDM_WS_PORT=7080
|
|
29
|
+
;;
|
|
30
|
+
*)
|
|
31
|
+
error "Unknown environment: $ENVIRONMENT (specify prod or dev)"
|
|
32
|
+
;;
|
|
33
|
+
esac
|
|
34
|
+
|
|
35
|
+
# --- run --------------------------------------------------------------------
|
|
36
|
+
# CWD is SCRIPT_DIR (mdm-server/), so the default data directory (apks/,
|
|
37
|
+
# device_registry.json) stays under mdm-server/ as before.
|
|
38
|
+
info "Starting STYLY-MDM server (${ENVIRONMENT}) ..."
|
|
39
|
+
exec python -m styly_mdm
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""STYLY-MDM control server package.
|
|
2
|
+
|
|
3
|
+
Exposes the aiohttp application factory and the console entrypoint. The server is
|
|
4
|
+
started with the ``styly-mdm`` console script (or ``python -m styly_mdm``); it is
|
|
5
|
+
not an ASGI app, because the LAN UDP discovery responder is started in the same
|
|
6
|
+
asyncio loop as the HTTP server (see server.run_server).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
10
|
+
|
|
11
|
+
from .server import create_app, main, run_server
|
|
12
|
+
|
|
13
|
+
try:
|
|
14
|
+
__version__ = version("styly-mdm")
|
|
15
|
+
except PackageNotFoundError: # running from a source tree that isn't installed
|
|
16
|
+
__version__ = "0.0.0"
|
|
17
|
+
|
|
18
|
+
__all__ = ["create_app", "main", "run_server", "__version__"]
|