semvec/pypi-packages huggingface dataset:
pyesprima 1.0.0
Python port of Esprima, the Javascript parser.
License: BSD
Keywords: javascript parser

PyEsprima
=========

A Python port of [Esprima][1], the JavaScript parser.

Why shouldn't I use it?
-----------------------

It's pretty slow -- about two orders of magnitude slower to parse a 116k JS
file. The code was semi-automatically translated from JavaScript, and it does a
lot of string appending, which is fast in JS but slow in Python.

Why should I use it?
--------------------

Shelling out to a NodeJS process is likely to be a better way to use Esprima
from Python. However, writing the interprocess data-marshaling code is a bit
annoying, so if you want to do a quick hack on small amounts of data, PyEsprima
is a good way to get down to business. The API is exactly the same, so you can
easily swap in an interface to the external Node process later on.

Also, since the code is semi-automatically translated using [js2py][2], it's
pretty easy to keep up-to-date. You could even do it yourself. Don't fear the
bit rot!

API
---

Pretty much the same as Esprima's / SpiderMonkey's API::

    >>> import pyesprima

    >>> print pyesprima.tokenize("1 + 1")
    [{'type': 'Numeric', 'value': '1'},
     {'type': 'Punctuator', 'value': '+'},
     {'type': 'Numeric', 'value': '1'}]

    >>> pyesprima.parse("1 + 1", loc=True)
    {'body': [{'type': 'ExpressionStatement', 'expression': {'operator': '+',
    'loc': {'start': {'column': 0, 'line': 1}, 'end': ...

Installing
----------

    pip install pyesprima

[1]: http://esprima.org/
[2]: https://github.com/int3/js2py
django-apihangar 0.1.1
through-the-web creation of templated sql->json APIs for querying data
License: BSD

== Installation ==

To install into an existing Django project:

 * Add "apihangar" to your INSTALLED_APPS
 * include() "apihangar.urls" somewhere in your URLconf
 * Define APIHANGAR_DATABASES in your settings.py

APIHANGAR_DATABASES specifies which database connections may be used
by the apihangar to issue queries against.  The setting should be 
a list of 2-tuples (alias, label) where the aliases refer to database
connection aliases defined in your project's DATABASES setting.

IT IS NOT RECOMMENDED THAT YOU ADD "default" TO YOUR APIHANGAR_DATABASES.
The recommended way to use apihangar is to set up one or more read-only
database connections; add these as secondary databases in your DATABASES 
dict; and then use these read-only connections for your APIHANGAR_DATABASES.