A python library that can be used to have macros inside python functions through decorators.
Project description
PyMacro
Welcome to pymacro, a python library that you can use to have MACROS inside your python functions. It uses a decorator to find and replace macros inside of comments with valid python code. It can be used in the following manner.
from pymacro import macro
@macro
def func_with_macro():
# DEFINE x 10
print(x)
The DSL inside the comments is turned into valid python code.
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 python-pymacro-0.1.0.tar.gz.
File metadata
- Download URL: python-pymacro-0.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.5+ Linux/5.14.6-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c05341b89af7465fab7d3d397f9f1ea164e677d5c3adb98157b688d52471109
|
|
| MD5 |
100618f57ca37ec8f12c811a3e249e1d
|
|
| BLAKE2b-256 |
8005199763d7ba9bea7542d76a6dc4e40a4f28bfcffc97060c17be8983243e79
|
File details
Details for the file python_pymacro-0.1.0-py3-none-any.whl.
File metadata
- Download URL: python_pymacro-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.5+ Linux/5.14.6-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
216093c81c536d08ce9573d4f61264a507705cd5748d24600d4b09083defb8a8
|
|
| MD5 |
aef8871013dc9319af08b072c714c1e1
|
|
| BLAKE2b-256 |
347f7402b1c68629b4810ae268df041c4d1554cf86eb936469164064e85c79bc
|