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.5.tar.gz
(8.0 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
File details
Details for the file macrolibs-0.0.5.tar.gz.
File metadata
- Download URL: macrolibs-0.0.5.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
318a7fb41f233dc572da84aae793d421d9589869b7f2802f6100d5ba9cb7fdd3
|
|
| MD5 |
5be8305354de395883610f9442c9807d
|
|
| BLAKE2b-256 |
7cf306b8418ef56dca35dd98eb741430ef24858481b514acedfa88072fd4c2a4
|
File details
Details for the file macrolibs-0.0.5-py3-none-any.whl.
File metadata
- Download URL: macrolibs-0.0.5-py3-none-any.whl
- Upload date:
- Size: 8.9 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 |
d0a17375828e92c6656cd5d47bcdecfb63a25442b4b748dc923d41a1f306601c
|
|
| MD5 |
62b15ad6e611f71e12ef5a1260aec250
|
|
| BLAKE2b-256 |
76df819ba5122cf80fc567efdcedce78fb0dff8a3bc865578bf1a71cdddf767f
|