Python library for search queries in REST APIs (filters, pagination, sorting) based on validataclass and SQLAlchemy.
Project description
validataclass Search Queries
Shared Python library for search queries based on validataclass.
Implements search filters, pagination and sorting using dataclasses and validators, and provides helpers to work with database queries (currently SQLAlchemy 1.4 and 2.0 are supported, however, support for SQLAlchemy 1.4 is deprecated now).
Status: Beta.
Installation
validataclass-search-queries is available on PyPI.
To install it using pip, just run:
pip install validataclass-search-queries
If you add the package to your dependencies, it is recommended to use compatible release version specifiers to make sure you always get the latest version of the library but without running into breaking changes:
pip install validataclass-search-queries~=0.6.0
However, keep in mind that the library is still in its beta phase (as indicated by the major version of 0). There can and will be smaller breaking changes between 0.x minor versions, but we will try to keep them at a minimum and save the big breaking changes for the release of version 1.0.0.
Usage
See docs for the documentation, including a quick tutorial on how to use this library.
Development
Virtual environment
To setup a virtualenv for development of the library, run make venv.
This will create a virtualenv in venv and install the package in edit mode inside the virtualenv, including testing
dependencies.
Running unit tests
Unit tests can be run using make tox or by directly executing tox.
For this to work you need to either be inside the virtualenv (see above) or have tox installed in your system locally.
Take a look at the Makefile for more ways to run the unit tests (e.g. inside a Docker container to test for specific
Python versions).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 validataclass_search_queries-0.6.0.tar.gz.
File metadata
- Download URL: validataclass_search_queries-0.6.0.tar.gz
- Upload date:
- Size: 59.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1f2dcd66663bef0fa1a8ed4cdc154292fcb6ae63ea2dceb6b029cc8eda18fc7
|
|
| MD5 |
708321f9c8f601bdf32ab0d06c399266
|
|
| BLAKE2b-256 |
0955ebaf8d6d27750a025c51777a5a7eaa96476e8944610e354eb7636f27a88a
|
File details
Details for the file validataclass_search_queries-0.6.0-py3-none-any.whl.
File metadata
- Download URL: validataclass_search_queries-0.6.0-py3-none-any.whl
- Upload date:
- Size: 43.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f60221e9713e71093775043bd97f5398bd933d7c1445d151a260716c22414ac0
|
|
| MD5 |
242f2129df1a4216cc98c7142316c85b
|
|
| BLAKE2b-256 |
5c464703c7c76be862a068fb28dd056e8269bbc418e96ba279373c5b39da82c2
|