town_clock.util package
Submodules
town_clock.util.clock_exceptions module
town_clock.util.clock_logging module
town_clock.util.location_sunrise_sunset module
Calculates sun position.
town_clock.util.utils module
- class CLOCK(value)[source]
Bases:
Enum
CLOCK Names A enum used for controlling and altering the clock times independently. todo: Use enum with objects..
- ALL = 0
- ONE = 1
- TWO = 2
- class Log_Level(value)[source]
Bases:
Enum
Log Levels: CRITICAL: 50 EXCEPTION = 40 ERROR: 40 WARNING: 30 INFO: 20 DEBUG: 10 NOTSET: 0
- CRITICAL = 50
- DEBUG = 10
- ERROR = 40
- EXCEPTION = 40
- INFO = 20
- NOTSET = 0
- PULSE = 45
- SUCCESS = 25
- WARNING = 30
Module contents
Utility package for town-clock
All modules can use these utility functions and classes.
Author: Zack Hankin Started: 27/01/2023
- class CLOCK(value)[source]
Bases:
Enum
CLOCK Names A enum used for controlling and altering the clock times independently. todo: Use enum with objects..
- ALL = 0
- ONE = 1
- TWO = 2
- class Log_Level(value)[source]
Bases:
Enum
Log Levels: CRITICAL: 50 EXCEPTION = 40 ERROR: 40 WARNING: 30 INFO: 20 DEBUG: 10 NOTSET: 0
- CRITICAL = 50
- DEBUG = 10
- ERROR = 40
- EXCEPTION = 40
- INFO = 20
- NOTSET = 0
- PULSE = 45
- SUCCESS = 25
- WARNING = 30
- class Mode(value)[source]
Bases:
Enum
Either Test or Active
DEV = ‘dev’ TEST = ‘test’ ACTIVE = ‘active’
- ACTIVE = 'active'
- DEV = 'dev'
- TEST = 'test'
- convert_position_string_to_number(position_str: str) float [source]
Converts a position string to a number.
- Parameters:
position_str – str: Position in the form of a string. eg “30.3402W”