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.9.tar.gz
(11.2 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.9-py3-none-any.whl
(12.2 kB
view details)
File details
Details for the file macrolibs-0.0.9.tar.gz.
File metadata
- Download URL: macrolibs-0.0.9.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
370578b9ce39acbe237e5925f0c10ef422fd34c11f87cf93e569b465a43a2afa
|
|
| MD5 |
a69e6472cfec1a0163ce5a4f7d09e547
|
|
| BLAKE2b-256 |
a0e93d57d751af64626408dffd7bca91d21d222ff68d8aa648117c444b9fe2a4
|
File details
Details for the file macrolibs-0.0.9-py3-none-any.whl.
File metadata
- Download URL: macrolibs-0.0.9-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17301183648b165a985f8a5882480ebd7825154345506e6fe909e246ef79324e
|
|
| MD5 |
cfde2ca9dc87e8e50f6a8f666ea918b3
|
|
| BLAKE2b-256 |
7682bf433bc4b65915bea83d3a7ed07ded0e16ea2e4e179927a8b5f839e3a276
|