Skip to main content

Registry and solver of mathematical equations

Project description

Example:

from redbeaver.eq import Eq as eq
from redbeaver.calc import calc
eq.eq_registry
{}
@eq(1)
def a(b, c):
    return b + c
eq.eq_registry
{'a': {'args': ['b', 'c'], 'fn': <function redbeaver.eq.wrapped>}}
@eq(2)
def b(c):
    return 2 * c
eq.eq_registry
{'a': {'args': ['b', 'c'], 'fn': <function redbeaver.eq.wrapped>},
 'b': {'args': ['c'], 'fn': <function redbeaver.eq.wrapped>}}
eq.params
{}
eq.params['c'] = 5
eq.params
{'c': 5}
calc('a', eq)
15
eq.params
{'a': 15, 'b': 10, 'c': 5}

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

redbeaver-0.1.11.tar.gz (1.6 kB view hashes)

Uploaded Source

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