All of my macros in one place!
Project description
pip install macrolibs
Macros for type conversions, recursive search, file handling, etc...
typemacros
import macrolibs.typemacros
Includes:
- standardization of unions, intersections, and compliments for all base iterables
replace_value_nestedrecursive find and replace for all nested data structuresmaybe_argautomatic function argument reduction (reductive polymorphism)copy_typefunctor with name cache for creating new types (also maps reflexive methods to new type)maybe_typeattempts to apply type constructorwrap_typesattempts to apply type constructor for specified types
And more!
filemacros
import macrolibs.filemacros
Includes:
get_script_dirfunction to return the directory of the call location
(this is different from os.getcwd as it will retun the location of the file
making the function call)
-
full_walkreturning full paths fromos.walk -
open_jsonandsave_jsonwith default format option
misc
import macrolibs.misc
Includes:
profile_runA custom profiling function similar to cProfile.run() with enhanced formatting options.
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
macrolibs-0.0.7.tar.gz
(10.3 kB
view details)
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
macrolibs-0.0.7-py3-none-any.whl
(11.7 kB
view details)
File details
Details for the file macrolibs-0.0.7.tar.gz.
File metadata
- Download URL: macrolibs-0.0.7.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
488d72a03b9cc087a03093fb1969ad83bbc16b2e661d0ff673faae2426cba833
|
|
| MD5 |
89db96684e492db2f0da2c3512a83ab9
|
|
| BLAKE2b-256 |
c865f6f392bad2002edfa8e2ad18db611facf4047b856fd65d6c81429986204d
|
File details
Details for the file macrolibs-0.0.7-py3-none-any.whl.
File metadata
- Download URL: macrolibs-0.0.7-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
212fbdbd8d104f2b2b82fb49d26f26b061f7fded6d8700e486071f94e611d4e1
|
|
| MD5 |
49e9faae9bee069941946fdf315d8205
|
|
| BLAKE2b-256 |
13e964e147d269b0655ff7291a205a7880988527e2461964133b4bf7ff829ba3
|