uv syncCroupier reads its settings from ~/.croupier.json. Copy the example config shipped with the repo:
cp .croupier.json ~/.croupier.jsonEdit the file if your RabbitMQ instance is running on a different host or with different credentials.
uv run mainThe server will start listening for messages on the configured RabbitMQ queue.
Open demo.py and change the network_host value to the IP address of your ESC/POS network printer:
message = Message(
id=str(uuid.uuid4()),
content=build_receipt(),
network_host="<YOUR_PRINTER_IP>", # e.g. "192.168.1.114"
network_timeout=10,
)Then, in a separate terminal, publish a test receipt:
uv run demo.pyThe commands below can also be executed using the xc task runner, which combines the usage instructions with the actual commands. Simply run xc, it will popup an interactive menu with all available tasks.
Install the dependencies and/or ensure project virtualenv is up to date.
run: once
uv syncRequires: install
Run Linters, Formatters, Type Checkers, and Tests.
uv run validate-pyproject pyproject.toml
uv run typos
uv run bandit -c pyproject.toml -r ./src ./tests
uv run pyup-dirs --py314-plus recursive src tests
uv run taplo lint pyproject.toml
uv run taplo format pyproject.toml
uv run ruff check
uv run ruff format
uv run pyrefly check
uv run zuban check
uv run zuban mypy
uv run vulture
uv run pytest