Michał Karzyński - Building beautiful RESTful APIs using Flask

preview_player
Показать описание
Michał Karzyński - Building beautiful RESTful APIs using Flask
[EuroPython 2016]
[22 July 2016]
[Bilbao, Euskadi, Spain]

This talk demonstrates a technique for developing RESTful APIs using
Flask and Flask-Restplus. These tools automate common API tasks such
as: validating input, serializing output, routing requests to methods,
and turning Python exceptions into HTTP responses.

The final API comes with a Swagger interactive UI, which documents all
endpoints and makes testing easy. The described tools tools provide
just enough syntactic sugar to make your code readable, scalable and
easy to maintain.

-----

Modern software is powered by APIs. User facing apps may run in the
browser or on mobile platforms, but they almost universally rely on
data stored in the cloud. More often then not apps use a RESTful API
to exchange data with the server.

In my talk I will demonstrate a technique for developing RESTful APIs
using the [Flask][1] micro-framework and [Flask-Restplus][2]. These
powerful tools automate most common tasks associated with API
development: validating input, serializing output, routing requests to
methods, and turning Python exceptions into machine-readable HTTP
responses.

A Flask-Restplus API is fully documented by [Swagger][3] which lists
all defined endpoints, their query parameters and the format of input
and output JSON objects. Swagger generates an [interactive UI][4] for
selecting options and easily testing queries. Flask and Flask-Restplus
provide just enough syntactic sugar to make your code readable,
scalable and easy to maintain.

My presentation will give an overview of the features of Flask and
Flask-Restplus; I will describe how easy it is to get started and
discuss some best practices for building complex APIs using this
approach. I will wrap up by briefly mentioning other components of the
Flask ecosystem, which give this micro-framework power to match fully-
loaded systems such as Django.

Рекомендации по теме
Комментарии
Автор

Thank You Michal Karzynski
, it took me a long time to find this nice tutorials :)

zakaria.morchid
Автор

This was really awesome the only change I had required to get it working was to reinstall all the packages

shaounakn
Автор

Hi Sir,
Am thanks full for your all Flask-Rest Plus API. Which is giving me lots of benefits in my Project.
Am new in API, my first question is that,
Can you enable CORS option for all endpoint ?
I have tried many thing, but I was not found right code yet.

Thanks for your efforts, once again

dayachoudekar
Автор

What is it Decorator in Flask? Which tools are exists for Auth using Token?

pingpongpingpong
Автор

Methods, Path and Query are all parts of header aren't they?

AdityaFingerstyle
Автор

Why not just use django rest framework?

blonditbg