Pyprql

Latest version: v0.13.0

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 9

0.4.3

Bug Fixes

- *****: Merge 42
([`6cca7e2`](https://github.com/PRQL/pyprql/commit/6cca7e21747f785172ce37e51875c7317765a3f1))

Moves backend to prql-python

Build System

- **pyproject.toml**: Respecify prql-python version
([`310f731`](https://github.com/PRQL/pyprql/commit/310f731f44ccf313896e600aad2dd5e514c3616a))

Changes version specification to ^0 to allow for minor release updates.

Code Style

- *****: Apply lints
([`94f4cc2`](https://github.com/PRQL/pyprql/commit/94f4cc21c811e74f5ef32202f3948581b5ea9a8f))

- **cli/__init__.py**: Remove whitespace
([`7b5f9f4`](https://github.com/PRQL/pyprql/commit/7b5f9f4f063a278abf913fef546144fafa17c8c6))

Continuous Integration

- *****: Add coverage support
([`0b50b0a`](https://github.com/PRQL/pyprql/commit/0b50b0a9d67e5a92f5c08c21f45a7d757fde5c1a))

Configure rpository to CodeCov. Several small changes here: CodeCov action add to workflow,
dependencies added to pyproject.toml and noxfile, and coverage files ignored in .gitignore.

- *****: Remove enforce_typing
([`32b90c6`](https://github.com/PRQL/pyprql/commit/32b90c63c74ec5b3e43fe8c8baecab16afc30054))

Now that we are confident we can handle all necessary typing with mypy, this is no longer necessary.

- **cicd.yml**: Refactor psr
([`84e158b`](https://github.com/PRQL/pyprql/commit/84e158be6b053e57b924c013893f6673cf67bfa6))

Moves PSR to a separate action to ease maintenance

- **setup_nox**: Fix cache number
([`4246978`](https://github.com/PRQL/pyprql/commit/42469783732c74ef0e53f030de6409a5cac42a8c))

The action was not referencing the correct input cache_number, so an old cache was being used.

Documentation

- **docs**: Correct file links
([`6eb1910`](https://github.com/PRQL/pyprql/commit/6eb19103c0b4cf6bf524c8378608c8e3cba55e0e))

Corrects docs structures to reflect the new test structure.

- **README.md**: Add CodeCov coverage
([`93f1009`](https://github.com/PRQL/pyprql/commit/93f1009ec9d7bf8e6992da5b935d5df0e4ddf006))

Closes 39.

Refactoring

- Adding simple tests
([`2e68cc2`](https://github.com/PRQL/pyprql/commit/2e68cc2a6f7a8505c82504f7bfe52cbe8225fd20))

- Fixing type definition on Filter.fields to List[FilterLine]
([`8797b99`](https://github.com/PRQL/pyprql/commit/8797b99c6f4e580f49ae9a3851db39c4976dbec7))

- *****: Apply mypy fixes
([`fd81bd1`](https://github.com/PRQL/pyprql/commit/fd81bd150023ecb98c80638f9ba974ee2301801b))

Removing enforce_types revealed a large number of mypy errors that must have been formerly masked.
This commit fixes (nearly) all of those.

- **tests**: Refactor tests
([`d90da5c`](https://github.com/PRQL/pyprql/commit/d90da5c025803f3388ddb58ff11b3b26ca38a99a))

This moves the test directory to the top level. Additionally, for simplicity, it moves the tests
functions to the top level, as allowed by PyTest.

0.4.2

Bug Fixes

- Fixes enforce typing breaking on subscripted generics by forking and providing a flag to ignore
this non-error.
([`cb19cbc`](https://github.com/PRQL/pyprql/commit/cb19cbc81275b291856818fd5689881007d5ee3c))

Code Style

- *****: Blacken files
([`9a0abfb`](https://github.com/PRQL/pyprql/commit/9a0abfb54ec7ee9f99ac352defb6ee3252d691af))

Continuous Integration

- **noxfile.py**: Add tests to lints
([`2eeac9b`](https://github.com/PRQL/pyprql/commit/2eeac9bc4f15ddd7e94229535a409e6ac295bc71))

Adds the tests directory to the CI/CD suite. Additionally, adds the flake8-pytest-style plugin for
checking tests.

Documentation

- **docs**: Add tests to the sphinx build
([`049ff35`](https://github.com/PRQL/pyprql/commit/049ff353e37b180201228c45411713ef73f78761))

- **index.md**: Add docs badge to docs
([`3029853`](https://github.com/PRQL/pyprql/commit/3029853a76dfc0952e2e2904e6ffede3019c3726))

Forgot to do this when adding to the README.

- **LICENSE**: Add license
([`7119bec`](https://github.com/PRQL/pyprql/commit/7119bec4a80a1f4b11c4134bf034d5dcf8dbca41))

0.4.1

Bug Fixes

- Fixes 27
([`b666dd0`](https://github.com/PRQL/pyprql/commit/b666dd03135bb209431575f5d1481e29299576cd))

Build System

- **.gitignore**: Ignore vim session files
([`29d1f61`](https://github.com/PRQL/pyprql/commit/29d1f6153a4bcf1a10452e215f47f9fbc666f3a8))

Code Style

- *****: Blacken files
([`7c6dc37`](https://github.com/PRQL/pyprql/commit/7c6dc3743bafd39fc3f74cc7f2fa15b153933187))

Documentation

- *****: Correct urls
([`0622add`](https://github.com/PRQL/pyprql/commit/0622add58fdb0dcf271102ac69f4a6dc71eb2ff5))

Correct URLS to reflect move to prql org.

- *****: Provide docstrings throughout
([`c1b7b6d`](https://github.com/PRQL/pyprql/commit/c1b7b6dc18db481f8c678cf09811afa3a25d9988))

DOCUMENT ALL THE THINGS!!!!!! Should provide docstrings for all code, so we can get all with Sphinx.

- **docs**: Add Sphinx support
([`f966f34`](https://github.com/PRQL/pyprql/commit/f966f349d6c81f31f8abd87f929addb4b73d2e81))

Minimum working sphinx build. Some areas (namely testing) need expanded documentation. This also
adds a code of conduct and a guide for contributing.

- **README.md**: Get those badges
([`2547540`](https://github.com/PRQL/pyprql/commit/2547540aee2108b6c326e219e1a21bed35ca2a8d))

Got to be jazzy! In all seriousness, provides a useful shortcut to a lot of information.

Refactoring

- *****: Apply various lints to build docs
([`b3d2962`](https://github.com/PRQL/pyprql/commit/b3d2962e568d70d7c0934a3b91ff0c1987ca1855))

0.4.0

Bug Fixes

- Closes 20, All derives should now be in where clause
([`c736b25`](https://github.com/PRQL/pyprql/commit/c736b25b97a3fc7b3a2f873df6860139626b38d2))

- Closes 21, replace_tables now available to all to_sql transformations
([`eb12075`](https://github.com/PRQL/pyprql/commit/eb1207595af4f86df9496c1c7d441b5ab4f8b566))

- Final commit for fix11
([`421fb04`](https://github.com/PRQL/pyprql/commit/421fb044b687a63547c45562193ad18c4940145e))

- Fix11 , use the AST in the completer. This adds support for table aliases when completing fields.
([`9e79119`](https://github.com/PRQL/pyprql/commit/9e79119b0fd308ab5928f50e447e4623a9ed18c2))

- Fixes 10 typing a letter afer period was not auto completing
([`ee8c7f5`](https://github.com/PRQL/pyprql/commit/ee8c7f57bd84e0b535441b546a96949f57280ecb))

- **prql.lark**: Match file names directly
([`259763b`](https://github.com/PRQL/pyprql/commit/259763b877f9e4385c60f3a986961b9a533892df))

Provides a regex to directly match file names for parsing. I'm reasonably confident there is
probably an edge case, but this seems to handle most path situations I can think of.

- **prql.lark**: Support extensions for to statement
([`82325a6`](https://github.com/PRQL/pyprql/commit/82325a66c5d5d73e8382011fe2ca681f24914aa6))

file_name should be of type name to allow for extensions.

This doesn't cover full file paths yet. Common separators (eg /, ~) still fail to parse correctly.

- **prql.parl**: Add filename parameter
([`f567cd6`](https://github.com/PRQL/pyprql/commit/f567cd6b0a8e2e58488ef392e3d212159ab76f2a))

I'd forgot to add a filename parameter when constructing the grammar.

Build System

- **pyproject.toml**: Add pandas
([`88d988f`](https://github.com/PRQL/pyprql/commit/88d988f567c0e63f0f4964b73ddb60858ed578e8))

Requires a split version specification, as pandas 1.3 does not support 3.10, while pandas 1.4 does
not support 3.7

- **pyproject.toml**: Specify numpy version
([`8db2338`](https://github.com/PRQL/pyprql/commit/8db2338a5a311ef3d25a9e7eba91bc5db9a8cf21))

Specifies the numpy version to make sure we are using secure versions. The security patches require
>1.22.2, however, which is incompatible with python 3.7, so a split version specification is
givern. Security met for python >= 3.8. Note, as well, that the numpy team rate all affected
vulnerabilities very, very low.

Code Style

- *****: Apply lints
([`f2769e9`](https://github.com/PRQL/pyprql/commit/f2769e97d32150d06d0cb9bd6b43a4794b541043))

Continuous Integration

- **action.yml**: Add custom set-up nox
([`da56480`](https://github.com/PRQL/pyprql/commit/da564806bf14a1bc6e10f511f0d2d62d38e02314))

Given that the current set up nox action is broken, we create our own, and add some additional
features, including caching of the nox install and isntallation of poetry.

Inspired by:
https://github.com/scikit-build/scikit-build/blob/master/.github/actions/setup-nox/action.yml

- **cicd.yml**: Correct action path
([`ae0e7f7`](https://github.com/PRQL/pyprql/commit/ae0e7f7ab611a5be91305c0baa8d419c66010a4f))

- **cicd.yml**: Use custom nox action
([`b5337e3`](https://github.com/PRQL/pyprql/commit/b5337e328325f1eb985c181a38232218a947a3cc))

Update our cicd action to use our personal nox composite action.

Documentation

- Adding more prql examples
([`2e5149e`](https://github.com/PRQL/pyprql/commit/2e5149e36d167bb16d82de30676941b7c3f519a4))

- Adding prql examples
([`8ae2070`](https://github.com/PRQL/pyprql/commit/8ae2070a6d07c51c5df201de4a73a7435942478f))

- **cli.py**: Document connect_str properly
([`95e568d`](https://github.com/PRQL/pyprql/commit/95e568d6ba4bd581ba276290cc4dd10dff9a87f4))

Lints prefer init documented directly under class.

Features

- Adding code completion on table names for ':', fixes the handling of prev_selection by clearing
out on whitespace
([`46f7676`](https://github.com/PRQL/pyprql/commit/46f7676af190d1e5d008cc9f283628a2a47304f2))

- Adding completion for show columns and \d+
([`7b7f676`](https://github.com/PRQL/pyprql/commit/7b7f6768a4519de7ac8fbdc8458b57fe35b8baf7))

- Adding expression parsing for complex expressions without requiring '()'
([`855ebd0`](https://github.com/PRQL/pyprql/commit/855ebd0166e06f9d1e288c63b7e529f73e105e61))

- *****: Support saving to tsv
([`5a2630f`](https://github.com/PRQL/pyprql/commit/5a2630f7314b0a2ad04333b745d870f39d083486))

Users can now dump to TSV files. Need to add support for reading from them as well.

- **cli.py**: Import csv
([`c847eb2`](https://github.com/PRQL/pyprql/commit/c847eb269b0f48889e5b625b97377283a54b1bd1))

If the passed connection string points to a csv, then an in-memory sqlite database is created, and
the contents of the csv are dumped to the database. This could cause performance issues with very
large databases - both from storing the database in memory, and a speed hit for using
pd.DataFrame.to_sql to dump the dataframe. However, performance seems satisfactory on reasonable
sized datasets.

- **cli.py**: Support cli saving to csv
([`79382c1`](https://github.com/PRQL/pyprql/commit/79382c1aef6bd0e9c7f1e4686fde84b1e11b5f6d))

Now, users can dump query results to csv for downstream processing.

- **cli.py**: Support reading from tsvs
([`d2d675b`](https://github.com/PRQL/pyprql/commit/d2d675b7f398f8b32b27117cff1d2305ee85a811))

Now users can read from TSVs as well!

- **prql.py**: Adds grammar for to
([`3899c89`](https://github.com/PRQL/pyprql/commit/3899c89fcd6dc735a2fe6a09fd488bfff0a0fb4b))

Borrowing from the structure used for Joins, this grammar provides a parse-able `to` clause.
Currently, it only implements a grammar for CSVs, but it could be easily expanded to support
additional filetypes. THE PARSING IS NOT HERE IMPLEMENTED.

- **prql.py**: Parse to statements
([`2808f26`](https://github.com/PRQL/pyprql/commit/2808f26fb13b82d3800b6e0e92f3a12733291b9e))

Adds to statement support to the AST, allowing for parsing of to in a pipeline.

Refactoring

- Allowing for order named arg on sort placeable anywhere
([`5fd0c1f`](https://github.com/PRQL/pyprql/commit/5fd0c1f92fe0f3021de369cfaa7b905ffcb90a68))

- Clean up
([`559dab1`](https://github.com/PRQL/pyprql/commit/559dab108e9069a053306702cd97395dccee0834))

- Fixes 24, had junk data in the database causing weird results
([`f2d6058`](https://github.com/PRQL/pyprql/commit/f2d6058309be6878d0c30bd9ffc7de79128651cc))

- Updating grammar to not require () around expressions
([`3a6852a`](https://github.com/PRQL/pyprql/commit/3a6852a3d219e9b80bcc637d90783d95a906e855))

- *****: Improve CLI structure
([`bc9bb72`](https://github.com/PRQL/pyprql/commit/bc9bb72a20ca5119203cf02d404a618c847f9a85))

Move logic for running CLI into __init__, while providing a separate module for each of the main
components of the CLI (Lexer, Style, Completer, CLI).

- **prql.py**: Ignore type errors in 3.7
([`043e96c`](https://github.com/PRQL/pyprql/commit/043e96c4a34a2154d26158b8e7936750d1e8a2ba))

For some reason, some false positive type errors are thrown for 2 lines in python 3.7 only. As they
pass in >= 3.8 and are definitely not errors, they are ignored.

Testing

- **test_grammar.py**: Add unit tests for to statements
([`e8ff715`](https://github.com/PRQL/pyprql/commit/e8ff715b1c5cc76ee5b6a19eb1672ec169b2bec1))

Includes a (currently) failing test for complex file names. Will need to fix this in a future
commit.

- **test_grammar.py**: Correct index
([`3c68f01`](https://github.com/PRQL/pyprql/commit/3c68f01f322ab5e9f8f3969c201a212d0651b75a))

The searched for string in the test_aggregates_grammar_nested should occur at position == 0, not >
0.

- **test_grammar.py**: Exapnd to test coverage
([`0c1f06e`](https://github.com/PRQL/pyprql/commit/0c1f06eed1f06f6ca638292780ec351825007346))

Expands test coverage for complex file names with the to clause, using parametrisation to provide
coverage for both windows and Linux/Mac cases.

0.3.0

Features

- **prql.lark**: Add join aliases
([`94a405e`](https://github.com/PRQL/pyprql/commit/94a405ee44632f378476645c4303e08e91a275ef))

Add necessary grammar to support aliases in "from...join..." statements.

Refactoring

- Cleaning up tests, fixing join sql generation when join_type ( probably should rename that to side
) is None
([`c4fec3e`](https://github.com/PRQL/pyprql/commit/c4fec3ec664133b638fce2450aceaec43f181c95))

0.2.5

Bug Fixes

- **cli.py**: Match exit to [""]
([`aa40c42`](https://github.com/PRQL/pyprql/commit/aa40c421c99ad52ee798294f1c5ebe4059352575))

By matching exit to a list of empty strings, we prevent a Nonetype not iterable error from
triggering on exit.

Close 16.

- **cli.py**: Match exit to empty list
([`f8c04a3`](https://github.com/PRQL/pyprql/commit/f8c04a359190009d2aa121e13a3d4261aee5b7cc))

Previously, the completor matched exit to None. This triggered an "object not iterable error". By
matching to an empty list (obviously there will be nothing after exit, so we don't need to
retrieve possible completions), we can exit cleanly.

- **cli.py**: Remove sql print
([`fdf639e`](https://github.com/PRQL/pyprql/commit/fdf639e65e8522c57ea1c9400bd1c41de78833ac))

To prevent redundeancy, the generated SQL query is no longer printed in SQL mode only.

Closes 14.

Page 7 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.