A Python parser written in Python.
Project description
Parso is a Python parser that supports error recovery and round-trip parsing.
Parso has been battle-tested by jedi. It was pulled out of jedi to be useful for other projects as well.
Parso is very simplistic. It consists of a small API to parse Python and analyse the parsing tree.
Ressources
Uses semantic versioning
Installation
pip install parso
Future
There will be better support for refactoring and comments. Stay tuned.
There’s a WIP PEP8 validator. It’s however not in a good shape, yet.
Known Issues
async/await are already used as keywords in Python3.6.
from __future__ import print_function is not supported,
Testing
The test suite depends on tox and pytest:
pip install tox pytest
To run the tests for all supported Python versions:
tox
If you want to test only a specific Python version (e.g. Python 2.7), it’s as easy as
tox -e py27
Tests are also run automatically on Travis CI.
Acknowledgements
Guido van Rossum (@gvanrossum) for creating the parser generator pgen2 (originally used in lib2to3).
Changelog
0.1.0 (2017-05-30)
Pulling the library out of Jedi. Some APIs will definitely change.
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
Hashes for parso-0.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a87f9a13cc9b2fc0679c815aec79e71ae6d30520e453dc48c508f120c92e0cd1 |
|
MD5 | bc9c7987e252220ad2739b7e954a8472 |
|
BLAKE2b-256 | 232ccecee1eb364590d7c10cd3a2cdfed30d8773803828f748045dd8fa1b7c5f |