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.1.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.1-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for validataclass_search_queries-0.6.1.tar.gz
Algorithm Hash digest
SHA256 6ef663d676148afbda779a892bf2db4fb0640063b582878f4aac5dce1e1655d4
MD5 91d11926c9b7b3e3f9345dcf91c4c7bd
BLAKE2b-256 036e330f6638c5e45241fd744b798d7124ec2a21b86b487a4b6856236cb54314

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for validataclass_search_queries-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b6044d67ca6f6de5bd6d0655b340646603b04f85e36bb629c10087c565f52c0e
MD5 de2d4571754ef16c1cc5f3e20aa5e6d8
BLAKE2b-256 446db202456dd042d55a399dceb2f0437ee8cb8f8fd4d644dfb45fbad868fa66

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