Skip to main content

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)

  1. Update version in the repo-root pyproject.toml.
  2. 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 .
  1. 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 ~/.pypirc or via TWINE_USERNAME/TWINE_PASSWORD.
  • Keep README.md and 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

lorax_arg-0.1.1.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lorax_arg-0.1.1-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

Details for the file lorax_arg-0.1.1.tar.gz.

File metadata

  • Download URL: lorax_arg-0.1.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

Hashes for lorax_arg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e11fba9063bc764f869837f5507c7ce936171348ba59f10b95b43edcc0da78d7
MD5 146ab9fceabbb8e5e9d2ad21b8174fe5
BLAKE2b-256 09331a8b7b6ff84dddf21957f31ed43205df044811ccf1336c29be365b787a10

See more details on using hashes here.

File details

Details for the file lorax_arg-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: lorax_arg-0.1.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

Hashes for lorax_arg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d429a43d13b96a27472540b13284b7ddc864b700c03e4d99d6778a0811e2de7c
MD5 f806cc0fc064acb1a3f0a4853e3ca418
BLAKE2b-256 624d4790d93a18bed32b6be0394169070e340a5175972f643cb101e457d71031

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page