Skip to main content

Python library for search queries in REST APIs (filters, pagination, sorting) based on validataclass and SQLAlchemy.

Project description

validataclass Search Queries

Unit tests

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

validataclass_search_queries-0.6.0.tar.gz (59.9 kB view details)

Uploaded Source

Built Distribution

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

validataclass_search_queries-0.6.0-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

File details

Details for the file validataclass_search_queries-0.6.0.tar.gz.

File metadata

File hashes

Hashes for validataclass_search_queries-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e1f2dcd66663bef0fa1a8ed4cdc154292fcb6ae63ea2dceb6b029cc8eda18fc7
MD5 708321f9c8f601bdf32ab0d06c399266
BLAKE2b-256 0955ebaf8d6d27750a025c51777a5a7eaa96476e8944610e354eb7636f27a88a

See more details on using hashes here.

File details

Details for the file validataclass_search_queries-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for validataclass_search_queries-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f60221e9713e71093775043bd97f5398bd933d7c1445d151a260716c22414ac0
MD5 242f2129df1a4216cc98c7142316c85b
BLAKE2b-256 5c464703c7c76be862a068fb28dd056e8269bbc418e96ba279373c5b39da82c2

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