Django queries

Overview

Djaq

Unit test status Documentation Status PyPI - Python Version PyPi Version

Djaq - pronounced “Jack” - provides an instant remote API to your Django models data with a powerful query language. No server-side code beyond two lines of config is required. You don’t write backend classes, serializers or any other code to be able to immediately get whatever data you want to the client. And it is blazing fast.

Djaq queries are strings. A query string for our example dataset might look like this:

(b.name as title, b.publisher.name as publisher) Book b

This retrieves a list of book titles with book publisher. But you can formulate far more sophisticated queries, see below. You can send Djaq queries from any language, Java, Javascript, golang, etc. to a Django application and get results as JSON. In contrast to REST frameworks, like Django Rest Framework (DRF), you have natural access to the Django ORM from the client.

Djaq is a good fit if you want:

  • A fast, natural query language with great performance
  • Fast UI development
  • Fast development of Proof of Concepts
  • Microservice communication where some services don’t have access to the Django ORM or are not implemented with Python

Djaq sits on top of the Django ORM. It can happily be used alongside QuerySets and sometimes calling a Djaq query even locally might be preferable to constructing a Queryset, although Djaq is not a direct replacement for QuerySets. You can even combine Djaq queries and Querysets.

Features you might appreciate:

  • Immediate gratification with zero or minimal server-side code. Because there is minimal setup, there is minimal wasted effort if you later move to another framework, like GraphQL or DRF. But getting started calling your API is much faster than those frameworks.
  • A natural syntax that lets you compose queries using Python-like expressions. The query format and syntax is designed to be written by hand quickly. Readability is a key goal.
  • Complex expressions let you push computation down to the database layer from the client easily.
  • Fast cursor semantics and explicit retrieval. It only gets data you asked for.
  • Obvious performance behaviour. It will trigger a query in one obvious way through one of the generator methods: .dict(), .tuples(), .json().
  • A ready-to-go CRUD API that is easy to use. You can send requests to have an arbitrary number of Create, Read, Write, Delete operations done in a single request.
  • Customisable behaviour using your own functions and data validators.
  • A handy user interface for trying out queries on your data models.

Djaq provides allowing and disallowing apps and models you want to expose. It also provides a simple permissions scheme via settings.

Djaq UI

Djaq UI

You might also like...
Integrate GraphQL into your Django project.

Graphene-Django A Django integration for Graphene. 💬 Join the community on Slack Documentation Visit the documentation to get started! Quickstart For

Creating delicious APIs for Django apps since 2010.

django-tastypie Creating delicious APIs for Django apps since 2010. Currently in beta but being used actively in production on several sites. Requirem

 Django REST API with React BoilerPlate
Django REST API with React BoilerPlate

This is a setup of Authentication and Registration Integrated with React.js inside the Django Templates for web apps

Introduction to Django Rest Framework

Introduction to Django Rest Framework This is the repository of the video series Introduction to Django Rest Framework published on YouTube. It is a s

Scaffold django rest apis like a champion 🚀
Scaffold django rest apis like a champion 🚀

scaffold django rest apis like a champion 🚀

A minimalistic manga reader for desktop built with React and Django
A minimalistic manga reader for desktop built with React and Django

smanga A minimalistic manga reader/server for serving local manga images on desktop browser. Provides a two-page view layout just as reading a physica

JSON:API support for Django REST framework

JSON:API and Django REST framework Overview JSON:API support for Django REST framework Documentation: https://django-rest-framework-json-api.readthedo

DRF-extensions is a collection of custom extensions for Django REST Framework

Django REST Framework extensions DRF-extensions is a collection of custom extensions for Django REST Framework Full documentation for project is avail

Generate Views, Serializers, and Urls for your Django Rest Framework application

DRF Generators Writing APIs can be boring and repetitive work. Don't write another CRUDdy view in Django Rest Framework. With DRF Generators, one simp

Owner
Paul Wolf
Software, Python, Django, etc
Paul Wolf
Country-specific Django helpers, to use in Django Rest Framework

django-rest-localflavor Country-specific serializers fields, to Django Rest Framework Documentation (soon) The full documentation is at https://django

Gilson Filho 19 Aug 30, 2022
Web APIs for Django. 🎸

Django REST framework Awesome web-browsable Web APIs. Full documentation for the project is available at https://www.django-rest-framework.org/. Fundi

Encode 24.7k Jan 4, 2023
Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)

django-cors-headers A Django App that adds Cross-Origin Resource Sharing (CORS) headers to responses. This allows in-browser requests to your Django a

Adam Johnson 4.8k Jan 5, 2023
Authentication for Django Rest Framework

Dj-Rest-Auth Drop-in API endpoints for handling authentication securely in Django Rest Framework. Works especially well with SPAs (e.g React, Vue, Ang

Michael 1.1k Dec 28, 2022
Authentication Module for django rest auth

django-rest-knox Authentication Module for django rest auth Knox provides easy to use authentication for Django REST Framework The aim is to allow for

James McMahon 873 Dec 30, 2022
REST implementation of Django authentication system.

djoser REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework views to handle basic actions such

Sunscrapers 2.2k Jan 1, 2023
A JSON Web Token authentication plugin for the Django REST Framework.

Simple JWT Abstract Simple JWT is a JSON Web Token authentication plugin for the Django REST Framework. For full documentation, visit django-rest-fram

Jazzband 3.3k Jan 4, 2023
Transparently use webpack with django

Looking for maintainers This repository is unmaintained as I don't have any free time to dedicate to this effort. If you or your organisation are heav

null 2.4k Dec 24, 2022
Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.

drf-yasg - Yet another Swagger generator Generate real Swagger/OpenAPI 2.0 specifications from a Django Rest Framework API. Compatible with Django Res

Cristi Vîjdea 3k Jan 6, 2023