One CRUD to rule them all.
This tries to solve the following problems:
- Headless CRUD Wrapper - Programmatic and configurable CRUD system for models.
- Automatic CRUD API Endpoints - Create, Get, Get All, Patch Update and Delete REST API Endpoints for any database table.
- Schema Driven URL Sorting and Filtering - URL based sorting and filtering automatically available to all properties listed in schema.
- Swappable URL Conventions - Pick and choose between different URL conventions.
- Nested Database Mutations - Generic CRUD for nested databases. Eliminate N+1 network requests.
pip install anisodactylA typical CRUD interfaces db structure in a way where each table is a node:
Parent? --- Current --< Children?
Every table in your interconnected database sits at the center of it's own
relationship graph; optional Parent pointing inwards and optional Children
pointing outwards.
graph TD
c1(
<b>Child 1</b>
Timetable
Appointments
)
c2(
<b>Child 2</b>
Schedule
Designations
)
c3(
<b>Child N</b>
Address
Contacts
)
s(
<b>Self</b>
Staffs,Teachers
Employees,Trainees
Students,etc.
)
p(
<b>Parent</b>
Company
School
Library
Bakery
etc.
)
c1 & c2 & c3 === s === p
The diagram above forms the shape of an anisodactyl "crow foot" - digits (children), hallux (parent), connected through the central tarsometatarsus self.
Current object can be anything. It can be one of the children as well, being able to create any graph like structure imaginable.
// ?filter[key_name][operator]=value&[key_name][operator]=value
?filter%5Bkey_name%5D%5Boperator%5D=value&%5Bkey_name%5D%5Boperator%5D=valuebut
[and]gets encoded into%5Band%5Dwhich makes URLs ugly and unreadable.
// ?post_tag=fiction&comment_count__gt=10
?key_name__operator=value&key_name__operator=valueThe python standard due to Django influence.
// ?post_tag=fiction&comment_count=gt:10
?key_name=operator:value&key_name=operator:value
// ?fields=name,email
?fields=key1,key2,key3
// ?sort=-name
?sort=-field,fieldSuper clean, simple and developer centric.

