An SQL parser that uses LALR for sql parsing
Project description
# SqlAst
[](https://pypi.python.org/pypi/sqlast)
[](https://travis-ci.org/Vesuvium/sqlast)
[](https://app.codacy.com/app/Vesuvium/sqlast)
[](https://app.codacy.com/app/Vesuvium/sqlast)
An SQL parser that uses LALR (instead of regex), providing precise, accurate
and complete SQL parsing. SqlAst is meant to be used as library, but a cli is
also provided.
Once the SQL is parsed, is provided as an abstract syntax tree that can be used
to transpile to another language, for example in an SQL to YAML transpiler,
to analyse the sql file, or to write your own SQL interpreter.
## Installing
```sh
pip install sqlast
```
## Usage
```python
from sqlast.App import SqlAst
tree = SqlAst.parse('hello.sql')
print(tree.pretty())
```
### Cli
```sh
sqlast parse hello.sql
```
[](https://pypi.python.org/pypi/sqlast)
[](https://travis-ci.org/Vesuvium/sqlast)
[](https://app.codacy.com/app/Vesuvium/sqlast)
[](https://app.codacy.com/app/Vesuvium/sqlast)
An SQL parser that uses LALR (instead of regex), providing precise, accurate
and complete SQL parsing. SqlAst is meant to be used as library, but a cli is
also provided.
Once the SQL is parsed, is provided as an abstract syntax tree that can be used
to transpile to another language, for example in an SQL to YAML transpiler,
to analyse the sql file, or to write your own SQL interpreter.
## Installing
```sh
pip install sqlast
```
## Usage
```python
from sqlast.App import SqlAst
tree = SqlAst.parse('hello.sql')
print(tree.pretty())
```
### Cli
```sh
sqlast parse hello.sql
```
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
sqlast-0.1.2.tar.gz
(4.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sqlast-0.1.2.tar.gz.
File metadata
- Download URL: sqlast-0.1.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
531f8f81ecd80ffb423fc5864d2efc4793026f8af800a98bc609dfbea878d816
|
|
| MD5 |
5b64691fb95c582949a9e07a82d12002
|
|
| BLAKE2b-256 |
41fdf75a33fae2ea611d866997b810a86c8274ce509e48909e4a8bb13db8ddd8
|
File details
Details for the file sqlast-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sqlast-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e82e396bd382176cc2298379e18afaf5ea7600d126791e5acf20a83fc912f06
|
|
| MD5 |
417a7278e7b23ab4fb0c3893f5d7672d
|
|
| BLAKE2b-256 |
146797616d13c2e70ae940718e86451b2a96f5a5c535e2551ab88a79ad430303
|