Skip to main content

An SQL parser that uses LALR for sql parsing

Project description

# 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.0.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sqlast-0.0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file sqlast-0.0.1.tar.gz.

File metadata

  • Download URL: sqlast-0.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for sqlast-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b26b0893e540046c9b108aabff3ccc42ac85c6a3cc939b6d307346dfc524b7a1
MD5 d884dd5cc9348a4588e8ac882d7848ac
BLAKE2b-256 ce3b1bcbc2297aa44d07bc6860ecb2d831dbe857d3e963020753da0285487b77

See more details on using hashes here.

File details

Details for the file sqlast-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: sqlast-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for sqlast-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e9de824e1b87f64cfca6ebbcaa24f6ade99f28cca8bc76da40d2023353660942
MD5 493898c457d7747b297eb813ebbee138
BLAKE2b-256 a8fedd0bf53ff31a01127bd2ad554db143dfec5c95ee020fdb8bf283ab77c882

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page