This project is designed to create a simple abstract model of a kettle and visualize it both in command line and on a webpage.
Example of the class Kettle
initiates with specifications from TOML
config file and an amount of water, which will be provided by user.
For easy access to config parameters without any string-like syntax, the project uses Pydantic
model.
The Flask webpages using simple base template with bootstrap4 CSS.
- Custom logger class (based on Python's logging module) is designed to write logs to a file. The name of the log file generates with a current date. The logger doesn't use stdout.
- In addition to logger all messages are writing into SQLite database with simple function in database_handler.
- User can interact with the kettle example in command line using the
poetry run start
command. - Also user can interact with the kettle example on webpage
/kettle/new
. It allows to create a new kettle and turn it on or off.