Reusable essentials to be used across Python projects.
Project description
Python Essentials
This project has reusable essentials for python projects, such as:
- Logger (enhanced with rich logging)
- Non-blocking hotkey monitoring via pynput (e.g. enable debug logging on the fly)
Example Usage
from essentialsx import Essentials
def foo():
print('bar')
if __name__ == '__main__':
essentials = Essentials()
# Create a logger easily
log = essentials.get_logger()
# Or create a logger with a logfile
log = essentials.get_logger(logfile='/tmp/mylogfile.log')
# Register custom hotkeys
essentials.register_hotkeys({'<ctrl>+<alt>+c': foo})
# Get all registered hotkeys
print(essentials.get_hotkeys())
# Enable hotkey monitoring
essentials.enable_hotkeys()
# Disable hotkey monitoring
essentials.disable_hotkeys()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
essentialsx-0.0.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for essentialsx-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ecea9bd9ea628f875b915f01974469e1540900d8e4ed9ae0d170ac211bf5ad6 |
|
MD5 | 46bbd3e61a47aafd72d07ec81ab99a84 |
|
BLAKE2b-256 | 8cf119c8055148e7c6c7b2fa8f52c0b482af82e13c20669d7f95165da7a3d720 |