Lorax single-port app (bundled UI + backend)
Project description
lorax-arg
lorax-arg is a pip-installable distribution that runs Lorax as a single-port app.
It ships the backend package in the same wheel so the install does not depend on a separate lorax PyPI release.
CLI entrypoint: lorax (with lorax-arg as an alias).
- React UI served at
/ - Backend API served at
/api/* - Socket.IO served at
/api/socket.io/
Development (monorepo)
This package can run against the backend Python package from packages/backend/ during development.
Build + sync UI assets (for wheel builds)
Build the website with VITE_API_BASE=/api, then copy the dist/ output into the Python package:
npm ci
VITE_API_BASE=/api npm --workspace packages/website run build
python packages/app/scripts/sync_ui_assets.py
Run from source without copying assets
export LORAX_APP_STATIC_DIR=packages/website/dist
python -m pip install -e .
lorax
Clean (remove build artifacts)
rm -rf build dist *.egg-info
find packages/app -type d -name __pycache__ -prune -exec rm -rf {} +
Production build (bundled UI)
Build the UI and bundle it into the Python package, then build the wheel/sdist:
npm ci
VITE_API_BASE=/api npm --workspace packages/website run build
python packages/app/scripts/sync_ui_assets.py
python -m pip install -U build
python -m build .
You can also run:
lorax build
Production install
Install the built wheel locally (recommended for production verification):
python -m pip install --force-reinstall dist/lorax_arg-*.whl
lorax
Publish online (PyPI)
- Update
versionin the repo-rootpyproject.toml. - Build fresh artifacts:
rm -rf build dist *.egg-info
npm ci
VITE_API_BASE=/api npm --workspace packages/website run build
python packages/app/scripts/sync_ui_assets.py
python -m pip install -U build twine
python -m build .
- Upload to TestPyPI (recommended), then PyPI:
python -m twine upload --repository testpypi dist/*
# verify: python -m pip install -i https://test.pypi.org/simple lorax-arg
python -m twine upload dist/*
Notes:
- You need PyPI credentials (or a token) configured in
~/.pypircor viaTWINE_USERNAME/TWINE_PASSWORD. - Keep
README.mdand metadata in sync with what you want on PyPI.
Project details
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 lorax_arg-0.1.tar.gz.
File metadata
- Download URL: lorax_arg-0.1.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96efcee0ec70c92080036c232199affab2d2e5c974ab2e26549ce82a77abd648
|
|
| MD5 |
09d1300afe401338b9cecb433bca46c3
|
|
| BLAKE2b-256 |
b7244f7f1440beb068ef506ff3d41b5ec3ee33a5fa379539e98c96eee93f332f
|
File details
Details for the file lorax_arg-0.1-py3-none-any.whl.
File metadata
- Download URL: lorax_arg-0.1-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcb78494ca1c775653d61774f94e0c6f387471a4024929fc54edd85286b88813
|
|
| MD5 |
9a61612d8239ddec5c1d065cc685c94b
|
|
| BLAKE2b-256 |
4fabdb39e1553d5a77a15176227d2dc67238867840dcc55bab8d926794f387d2
|