Skip to main content

PostgreSQL LIKE lookup functionality for Django. Django does contain __startswith, __endswith and __contains lookups, but all of them does escape "%" and "_" wildcard characters. The `__like` lookup is often faster, than the `__regex` lookup, so it can be used in cases when conditions are simple enough.

Project description

https://badge.fury.io/py/django-like-lookup.svg https://travis-ci.org/PetrDlouhy/django-like-lookup.svg?branch=master https://codecov.io/gh/PetrDlouhy/django-like-lookup/branch/master/graph/badge.svg

PostgreSQL LIKE lookup functionality for Django. Django does contain __startswith, __endswith and __contains lookups, but all of them does escape “%” and “_” wildcard characters. The __like lookup is often faster, than the __regex lookup, so it can be used in cases when conditions are simple enough.

Documentation

The full documentation is at https://django-like-lookup.readthedocs.io.

Quickstart

Install Django like lookup:

pip install django-like-lookup

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'like_lookup.apps.LikeLookupConfig',
    ...
)

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.1.0 (2020-01-29)

  • First release on PyPI.

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

django-like-lookup-0.1.0.tar.gz (16.5 kB view details)

Uploaded Source

File details

Details for the file django-like-lookup-0.1.0.tar.gz.

File metadata

  • Download URL: django-like-lookup-0.1.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for django-like-lookup-0.1.0.tar.gz
Algorithm Hash digest
SHA256 26e9c0b3d8f79ba20d329dbd31463a27799571ac9c885aa3d4d457387c0e1948
MD5 36800ca122da909fb763439cd616a4fb
BLAKE2b-256 2bd993a16366a14b8d63d19b1b9be5b23f735afba9d520b350225eba704624fd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page