Skip to main content

Tools to build rest api's

Project description

Build status Coverage Version status Documentation Status

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).

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

Author

Franck Bret franckbret@gmail.com https://github.com/franckbret

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.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

anyblok_pyramid_rest_api-0.1.0.tar.gz (20.5 kB view hashes)

Uploaded Source

Built Distribution

anyblok_pyramid_rest_api-0.1.0-py3-none-any.whl (36.7 kB view hashes)

Uploaded Python 3

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