All Projects → simonpercivall → Astunparse

simonpercivall / Astunparse

Licence: other
An AST unparser for Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Astunparse

Boop Gtk
Port of @IvanMathy's Boop to GTK, a scriptable scratchpad for developers.
Stars: ✭ 141 (-10.76%)
Mutual labels:  developer-tools
Web Vitals Extension
A Chrome extension to measure essential metrics for a healthy site
Stars: ✭ 1,943 (+1129.75%)
Mutual labels:  developer-tools
Edward
A tool for managing local microservice instances
Stars: ✭ 152 (-3.8%)
Mutual labels:  developer-tools
Httptoolkit Server
The backend of HTTP Toolkit
Stars: ✭ 140 (-11.39%)
Mutual labels:  developer-tools
Skaffold
Easy and Repeatable Kubernetes Development
Stars: ✭ 12,244 (+7649.37%)
Mutual labels:  developer-tools
Punk
A data REBL built for the web
Stars: ✭ 148 (-6.33%)
Mutual labels:  developer-tools
Zunit
A powerful testing framework for ZSH projects
Stars: ✭ 140 (-11.39%)
Mutual labels:  developer-tools
Chrome Extensions Reloader
A chrome extension for reloading unpacked extensions
Stars: ✭ 154 (-2.53%)
Mutual labels:  developer-tools
Github Actions
Open source list of GitHub Actions. Free free to submit a PR to add your action
Stars: ✭ 145 (-8.23%)
Mutual labels:  developer-tools
Metrogit
A git visualization tool that's more than just git
Stars: ✭ 152 (-3.8%)
Mutual labels:  developer-tools
Haack
Hæck
Stars: ✭ 142 (-10.13%)
Mutual labels:  developer-tools
Htty
htty is the HTTP TTY, a console application for interacting with web servers.
Stars: ✭ 1,755 (+1010.76%)
Mutual labels:  developer-tools
Sp Rest Proxy
🌐 SharePoint REST API Proxy for local Front-end development tool-chains
Stars: ✭ 147 (-6.96%)
Mutual labels:  developer-tools
Artisan Menu
📝 Artisan Menu - Use Artisan via an elegant console GUI
Stars: ✭ 141 (-10.76%)
Mutual labels:  developer-tools
Workly
A really simple way to move a function or class to a web worker. 🏋️‍♀️→ 😄
Stars: ✭ 1,848 (+1069.62%)
Mutual labels:  developer-tools
Frock
A plugin-based tool for running fake HTTP and socket services
Stars: ✭ 140 (-11.39%)
Mutual labels:  developer-tools
Fabric8
fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
Stars: ✭ 1,783 (+1028.48%)
Mutual labels:  developer-tools
Find
A find-in-page extension for Chrome and Firefox that supports regular expressions.
Stars: ✭ 157 (-0.63%)
Mutual labels:  developer-tools
Djoser
REST implementation of Django authentication system.
Stars: ✭ 2,019 (+1177.85%)
Mutual labels:  developer-tools
Modd
A flexible developer tool that runs processes and responds to filesystem changes
Stars: ✭ 2,030 (+1184.81%)
Mutual labels:  developer-tools

============ AST Unparser

.. image:: https://badge.fury.io/py/astunparse.png :target: http://badge.fury.io/py/astunparse

.. image:: https://travis-ci.org/simonpercivall/astunparse.png?branch=master :target: https://travis-ci.org/simonpercivall/astunparse

.. image:: https://readthedocs.org/projects/astunparse/badge/ :target: https://astunparse.readthedocs.org/

An AST unparser for Python.

This is a factored out version of unparse found in the Python source distribution; under Demo/parser in Python 2 and under Tools/parser in Python 3.

Basic example::

import inspect
import ast
import astunparse

# get back the source code
astunparse.unparse(ast.parse(inspect.getsource(ast)))

# get a pretty-printed dump of the AST
astunparse.dump(ast.parse(inspect.getsource(ast)))

This library is single-source compatible with Python 2.6 through Python 3.5. It is authored by the Python core developers; I have simply merged the Python 2.7 and the Python 3.5 source and test suites, and added a wrapper. This factoring out is to provide a library implementation that supports both versions.

Added to this is a pretty-printing dump utility function.

The test suite both runs specific tests and also roundtrips much of the standard library.

Extensions and Alternatives

Similar projects include:

* codegen_
* astor_
* astmonkey_
* astprint_

None of these roundtrip much of the standard library and fail several of the basic tests in the test_unparse test suite.

This library uses mature and core maintained code instead of trying to patch existing libraries. The unparse and the test_unparse modules are under the PSF license.

Extensions include:

* typed-astunparse: extends astunparse to support type annotations.

Features

  • unparses Python AST.
  • pretty-prints AST.

.. _codegen: https://github.com/andreif/codegen .. _astor: https://github.com/berkerpeksag/astor .. _astmonkey: https://github.com/konradhalas/astmonkey .. _astprint: https://github.com/Manticore/astprint

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].