Tools to build rest api's
Project description
Anyblok Pyramid Rest Api
The main idea is to provide facilities for building restful api that interacts with AnyBlok models through a CRUD like pattern.
As dependecy, it use Cornice for its validators and schema abilities and Marshmallow for schema definition, serialization and deserialization (we have since split this work to AnyBlok_Marshmallow).
Free software: Mozilla Public License Version 2.0
Documentation: https://anyblok-pyramid-rest-api.readthedocs.io
Features
Incoming request validation through schema (validation before database query and ability to validate several parts of the request object)
CRUD queries always with request.validated data
Data deserialization for response through schema
Easy CRUD resource declaration (map a model on an endpoint)
Automatic schema generation based on models introspection
Advanced collection filtering, ordering, paging (querystring validation through schema)
Todo
Helpers for JsonSchema or Swagger
Advanced introspection for api documentation generation
Request lifecyle
incoming request
-> validators -> deserializer (json to dict) -> schema load -> request.validated -> request.errors
request.validated
-> crud -> resulting records -> deserializer (records to schema dump) -> serializer (default pyramid / cornice dict to json serializer) -> response
Credits
Change Log
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
0.2.0 (2019-10-01)
Added
context key in querystring. The goal is to add some informations to help custom filter and tag to build their query
Refactored
Now the querystring desarializer use regex to get the informations
0.1.0 (2018-09-26)
Added
CRUDResource class to define REST api
service behaviours
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
Built Distribution
Hashes for anyblok_pyramid_rest_api-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72861cfaf319ef8853d1cb1f47897d1a233a16f122613046b3c8a9aeb8d1d716 |
|
MD5 | 268c16bbb337b4690d9a541e627ab75f |
|
BLAKE2b-256 | 2c972b48091737b0daf1f6c14fe81f4773d2976360db3c561e26fc00c32510f7 |
Hashes for anyblok_pyramid_rest_api-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 945e2863c7422e9b176db293633d54093e073a56f73561d8ce082b2b1cd239f1 |
|
MD5 | fff24cd51f5ebba432a7cd6d32d4c403 |
|
BLAKE2b-256 | 52490cf5088d77438cc90dcf38dbe437d25a9084170164d1d24ac171e56b1325 |