Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.
/ kettle Public archive

A simple abstract model of a kettle and visualization it both in command line and on a webpage.

License

Notifications You must be signed in to change notification settings

iwatkot/kettle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

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.

Features

  1. 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.
  2. In addition to logger all messages are writing into SQLite database with simple function in database_handler.
  3. User can interact with the kettle example in command line using the poetry run start command.
  4. 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.

Flask webpage example

Flask web page example

ASCIInema examples

  1. Creating a kettle and turning it off while heating.
    asciicast

  1. Creating an empty kettle and turning it on.
    asciicast

  1. Creating a kettle and not turning it on.
    asciicast

  1. Creating a kettle, turning it on and wait till the water boils.
    asciicast

About

A simple abstract model of a kettle and visualization it both in command line and on a webpage.

Topics

Resources

License

Stars

Watchers

Forks