Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-pymacro-0.1.0.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

python_pymacro-0.1.0-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page