Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pyprql contains:

- pyprql.pandas_accessor — Pandas integration for PRQL
- pyprql.magic — IPython magic for connecting to databases using `%%prql`
- pyprql.compile — An export of `prql-python`'s `compile` function

For docs, check out the [pyprql docs](https://pyprql.readthedocs.io/), and the
[PRQL Book][prql_docs].
Expand Down Expand Up @@ -51,6 +52,29 @@ In [4]: %%prql results <<

```

### Compilation

This library exposes `prql-python.compile`, so we can simply generate SQL:

```python
import pyprql
pyprql.compile("from artists | select track")
print(pyprql.compile("from artists | select track"))
```

...returns...

```sql
SELECT
track
FROM
artists
```

For context, `prql-python` is the Python binding for `prql-compiler`, so only
contains functions for compilation; and this library offers broader python
integrations and tooling.

## Support

This project was created by
Expand Down