This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
Introduction
============

ast2json is a small module that will convert any python AST node into its ast
representation formated in a JSON compatible python representation (list and
dicts containing string, ints and null).

Installation
============

::

pip install ast2json
# or to have lastest version
pip install git+git://github.com/Psycojoker/ast2json.git

Usage
=====

::

>>> import json
>>> from ast import parse
>>> from ast2json import ast2json

>>> ast = ast2json(parse(open('some_python_source_file.py').read()))
>>> print json.dumps(ast, indent=4)

If you are lazy, "str2json" will apply the "parse" method of ast on a string for you, so you'll be able to write:

::

>>> str2json(open('some_python_source_file.py').read())

Example
=======

This is the result of converting 'print "Hello World!"' (and applying json.dumps on the result).

::

{
"body": [
{
"_type": "Print",
"nl": true,
"col_offset": 0,
"dest": null,
"values": [
{
"s": "Hello World!",
"_type": "Str",
"lineno": 1,
"col_offset": 6
}
],
"lineno": 1
}
],
"_type": "Module"
}


Changelog
=========

0.2.1 (2016-11-13)
----------------

* fix broken pip installation by @abolger

0.2 (2016-09-03)
----------------

* python 3 support and some unit testing by Juncheol Cho @zironycho

Licence
=======

BSD
Release History

Release History

0.2.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ast2json-0.2.1-py2.py3-none-any.whl (6.5 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Nov 13, 2016
ast2json-0.2.1.tar.gz (4.2 kB) Copy SHA256 Checksum SHA256 Source Nov 13, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting