Skip to content

PaketMutfak/croupier

Repository files navigation

Croupier

Demo

1. Install dependencies

uv sync

2. Create the configuration file

Croupier reads its settings from ~/.croupier.json. Copy the example config shipped with the repo:

cp .croupier.json ~/.croupier.json

Edit the file if your RabbitMQ instance is running on a different host or with different credentials.

3. Start the server

uv run main

The server will start listening for messages on the configured RabbitMQ queue.

4. Update network_host and run the demo

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.py

Tasks

The 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

Install the dependencies and/or ensure project virtualenv is up to date.

run: once

uv sync

ci

Requires: 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages