cremalink.local_server module

This script is the main entry point for running the local proxy server.

The local server acts as an intermediary between the cremalink library and a coffee machine on the local network. It exposes a simple HTTP API that the LocalTransport can use, and it handles the complexities of direct device communication, including authentication and command formatting.

This script can be run directly from the command line. It requires a settings file for device credentials and can be configured with a specific IP and port.

Example: cremalink-server –settings_path /path/to/your/conf.json –ip 0.0.0.0 –port 10280

class cremalink.local_server.LocalServer(settings: ServerSettings)[source]

Bases: object

A wrapper class that encapsulates the Uvicorn server and the web application.

start() None[source]

Starts the Uvicorn server to serve the application.

cremalink.local_server.main()[source]

Parses command-line arguments and starts the local server.