Skip to main content

A minimal python parser, written in python

Project description

MiniPyParser

A minimal python parser, written in python

Upload Python Package

View License

Installing

Local

$ pip install -e minipyparser

PyPI

$ pip install minipyparser

Using

# examples/hello_world.py

print("hello, from mars!")
# examples/main.py

from minipyparser import tokenizer
from minipyparser import parser

for ast in parser.parse(tokenizer.tokenize(open("hello_world.py"))):
    print(ast)
$ cd examples
$ python main.py

Comment(value='examples/hello_world.py')
Call(head=Name(print), args=[Literal(value='hello, from mars!')])

2022 - Marcel Guinhos

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

minipyparser-0.1.0.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

minipyparser-0.1.0-py3-none-any.whl (6.8 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