Skip to main content

Prepared statements support for Django

Project description

# DJANGO-PREPARED-QUERY[![Build Status](https://travis-ci.org/DimaKudosh/django-prepared-query.svg?branch=master)](https://travis-ci.org/DimaKudosh/django-prepared-query)[![Coverage Status](https://coveralls.io/repos/github/DimaKudosh/django-prepared-query/badge.svg?branch=master)](https://coveralls.io/github/DimaKudosh/django-prepared-query?branch=master)[![PyPI](https://img.shields.io/pypi/pyversions/Django.svg)]()

## Installation
You can install `django-prepared-query` using pip:
```
$ pip install django-prepared-query
```

## Example
```python
from django_prepared_query import PreparedManager, BindParam


class Book(models.Model):
objects = PreparedManager()

qs = Book.objects.filter(name__startswith=BindParam('name_start'))
books = qs.execute(name_start='A')
```

## Documentation
Documentation is available here http://django-prepared-query.readthedocs.io/en/latest/

## Benchmark
[Here](https://github.com/DimaKudosh/django-prepared-query/blob/master/demo/benchmark.ipynb) you can find notebook with benchmark.

## Goals
* ~~Add support for in lookup.~~
* ~~Add support for limit/offset.~~
* Make this working without specifying BindParams.
* Add support for INSERT/UPDATE sql queries.

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-prepared-query-0.3.1.tar.gz (8.8 kB view details)

Uploaded Source

File details

Details for the file django-prepared-query-0.3.1.tar.gz.

File metadata

File hashes

Hashes for django-prepared-query-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5d2b99095b2a6b01b37492c9800d981f1817487ed239cd19aaa1e54ebaa511d1
MD5 5c310ad57884568c8eade6693fe0c0b3
BLAKE2b-256 a67acb374eda15fefb3e5c6ea9cd240f7fd8d509f8cca3635662324af011f300

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