Code Monkey home page Code Monkey logo

flask-raml's Introduction

Flask-RAML (REST API Markup Language) API server with parameter conversion, response encoding, and examples.

[Version] (https://github.com/salsita/flask-raml/tags) [PyPI package] (https://pypi.python.org/pypi/Flask-RAML/) [Downloads] (https://pypi.python.org/pypi/Flask-RAML/) [Supported Python versions] (https://pypi.python.org/pypi/Flask-RAML/) [License] (https://pypi.python.org/pypi/Flask-RAML/)

Supported Platforms

Get Started

Install using pip or easy_install:

pip install Flask-RAML
easy_install Flask-RAML

Optionally, you can specify yaml or raml extras to install related dependencies:

pip install "Flask-RAML[yaml,raml]"
easy_install "Flask-RAML[yaml,raml]"

Features

  • Load RAML API specification stored in any of supported markup languages using PyDataLoader.
  • Provide enhanced PyRAML API model.
    • Reuse PyRAML extensible API spec loader and parameter converters.
    • Use extensible flask-mime-encoders for request/response body decoding/encoding.
  • Provide enhanced route decorator with optional API request/response middleware layers.
    • Auto-decode request body based on Content-Type header (for JSON, it reuses Flask auto-decoding).
    • Convert and validate URI/query parameters.
    • Auto-encode response with specified route encoders mimetype.
  • Make it simple to serve API example response of requested/default MIME type.
    • Make also simple to serve example responses for all unhandled API resources and methods.

Tasks

  • Release example API spec and Flask API server.
    • Create repository flask-raml-example.
    • Design a modular sample API spec with examples and reusable schemas, types, traits and markdown docs.
    • Add gulp tasks to generate HTML docs and YAML spec from the sample RAML API specs.
    • Add gulp tasks for API testing using abao.
    • Add example app deployment from Github via API yaml/html build on CircleCI to uWSGI/Flask site on Heroku.
    • Extend raml2html API docs generator.
      • Add parameter details (min/max lenght/value, pattern).
      • Add API console for testing.
  • Add autoselect encoder (based on request Accept header) to flask-mime-encoders.
  • Add request body JSON schema validation.
    • Extend raml-js-parser to embed local JSON schema references for validation.
    • Optionally extend pyraml-parser too.
    • Add optional request body JSON schema validation to the route decorator.

Changelog

0.2.2

Features

  • Create encoded response for default http exceptions.
  • Add error logging.

0.2.1

Fixes

  • Fix HTTPException handling.
  • Add general Exception logging.

0.2.0

Features

  • Add custom logger name support.
  • Add view decorator support.
  • Return default http 500 error on any exception.
  • Add authorization support.

Fixes

  • Update dependencies to support Python 3.
  • Fix package setup on Python 3.

0.1.7

Fixes

  • Fix logging http status passed as string.
  • Fix Python 2.6 support with updated PyRAML 0.1.9.

0.1.6

Features

  • Allow custom route request/response decoders/encoders.
  • Allow abort without response body.
  • Enhance logging.

0.1.5

Fixes

  • Fix broken example view function attributes.
  • Fix broken mime encoders import.

0.1.4

Fixes

  • Fix PEP-8 style and method spec in view serving decorator.

0.1.3

Features

  • Update PyRAML dependency to add default option to ignore empty parameters unless '' is specified in enum.

0.1.2

Fixes

  • Fix package setup to not require dependencies preinstalled.

0.1.0

Features

  • Initial release.

flask-raml's People

Contributors

iki avatar nizarabak-kali avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.