Skip to main content

Parses arbitrary strings and returns a dictionary

Project description

text2code

Parses arbitrary strings and returns a dictionary.

Usage

from text2code import text2code as t2c

d = t2c("""
def f(x, y):
    return x + y

def a(b, c):
    return b + c
""")

The result of this code would be a dictionary with 2 keys: f, and a, both of which would be the functions defined above.

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

text2code-0.1.2.tar.gz (7.7 kB view hashes)

Uploaded source

Built Distribution

text2code-0.1.2-py3-none-any.whl (7.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page