My utility functions
Project description
argel1200
argel1200.utilities
A small collection of utility functions that help reduce boilerplate code.
dumps
Wrapper for dumper, to make it eaier to get Perl style Data Dumper output. Assumes you want strings back, and leverages get_variable_name to pull the calling function.
get_variable_name
Helper function used by dumps. Perl's Data::Dumper gives variable_name=value output. This seeks to mimic that.
import_class_from_string
Useful when you need to (or it's just more elegant to) dynamically determine the class based on a string that you are obtaining dynamically at runtime. Useful if you have a base class and multiple subclasses. Very useful if you want to build out your classes as needed (something can just be a base class now, then later on you could create a sub class for it and your script will start loading it as the new sub class automatically)
logging_init
Uses haggis.logs to add two additional "debug" logging levels: 'TRACE' and 'MEMDUMP' and initializes a logging instance if return_logger is True.
open_file
Wrapper for opening a file that provides basic error handling. Get those try blocks out of your script!
process_cli_using_click
Useful if you want to use click in standalone=False mode. Provides basic error handling (required for standalone=False)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file argel1200-1.0.4.tar.gz.
File metadata
- Download URL: argel1200-1.0.4.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8b1ee30cdd85765aa094b6423757f38ca043d2fde985ef680743bf755e93c88
|
|
| MD5 |
10301257d08a28c4956c68fc37c0a161
|
|
| BLAKE2b-256 |
5e8707ecebc934747f6d49040f6d1ae68860d410e7cf5cb4f7eec22965c07e1e
|
File details
Details for the file argel1200-1.0.4-py3-none-any.whl.
File metadata
- Download URL: argel1200-1.0.4-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a4aa47a576bde6a5a30a95c51358de736e4052dcc79de2fe060d62b982c5a30
|
|
| MD5 |
0b4e96fb760d3ebd9aa7b208c26eb734
|
|
| BLAKE2b-256 |
072343dfb534fd44eea8298fc72f8a4c5edab09c6d9d4f580f3093564dab9280
|