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.1.tar.gz
(3.9 kB
view details)
File details
Details for the file sqlast-0.1.1.tar.gz.
File metadata
- Download URL: sqlast-0.1.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b36fd0723fed579c030b121b4cd05229a1fb31855e95f3ca7b11cb5fafdf7b7a
|
|
| MD5 |
8385f9fbbe41aaf36d91ec155d7c5f09
|
|
| BLAKE2b-256 |
8fc2712f11335e6b970a764aac18881403459b9ef3e7f9a6114c8e85e3b8d492
|