All Projects → cenobites → Flask Jsonrpc

cenobites / Flask Jsonrpc

Licence: other
A basic JSON-RPC implementation for your Flask-powered sites

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Flask Jsonrpc

Potion
Flask-Potion is a RESTful API framework for Flask and SQLAlchemy, Peewee or MongoEngine
Stars: ✭ 484 (+117.04%)
Mutual labels:  flask, flask-extensions
Flask Json
Flask-JSON is a Flask extension providing better JSON support.
Stars: ✭ 34 (-84.75%)
Mutual labels:  flask, flask-extensions
Flask Googlemaps
Easy way to add GoogleMaps to Flask applications. maintainer: @RiverFount
Stars: ✭ 550 (+146.64%)
Mutual labels:  flask, flask-extensions
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+1166.82%)
Mutual labels:  flask, flask-extensions
Flask And Redis
Simple as dead support of Redis database for Flask applications
Stars: ✭ 76 (-65.92%)
Mutual labels:  flask, flask-extensions
Flask Blogging
A Markdown Based Python Blog Engine as a Flask Extension.
Stars: ✭ 609 (+173.09%)
Mutual labels:  flask, flask-extensions
Flask Apscheduler
Adds APScheduler support to Flask
Stars: ✭ 741 (+232.29%)
Mutual labels:  flask, flask-extensions
Flask Apidoc
Adds ApiDoc support to Flask
Stars: ✭ 49 (-78.03%)
Mutual labels:  flask, flask-extensions
Flask Mobility
A Flask extension to simplify building mobile-friendly sites.
Stars: ✭ 68 (-69.51%)
Mutual labels:  flask, flask-extensions
Flask Htmlmin
Flask html response minifier
Stars: ✭ 66 (-70.4%)
Mutual labels:  flask, flask-extensions
Flask simplelogin
Simple Login - Login Extension for Flask - maintainer @cuducos
Stars: ✭ 133 (-40.36%)
Mutual labels:  flask, flask-extensions
Dynaconf
Configuration Management for Python ⚙
Stars: ✭ 2,082 (+833.63%)
Mutual labels:  flask, flask-extensions
Flask Ask
Alexa Skills Kit for Python
Stars: ✭ 1,877 (+741.7%)
Mutual labels:  flask, flask-extensions
Doxbox
web-based OSINT and reconaissance toolkit
Stars: ✭ 202 (-9.42%)
Mutual labels:  flask
Ml React App Template
This is a template for creating a Machine Learning application with its front-end developed using React which interacts with a Flask service as the back-end and makes predictions.
Stars: ✭ 210 (-5.83%)
Mutual labels:  flask
Flask Rbac
Flask-RBAC
Stars: ✭ 198 (-11.21%)
Mutual labels:  flask
Ok ip proxy pool
🍿爬虫代理IP池(proxy pool) python🍟一个还ok的IP代理池
Stars: ✭ 196 (-12.11%)
Mutual labels:  flask
Authlib
The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
Stars: ✭ 2,854 (+1179.82%)
Mutual labels:  flask
Saas Base
SaaS base application (Flask, Vue, Bootstrap, Webpack)
Stars: ✭ 208 (-6.73%)
Mutual labels:  flask
Bolt Python
A framework to build Slack apps using Python
Stars: ✭ 190 (-14.8%)
Mutual labels:  flask

Build Status Coverage Status

Flask JSON-RPC

A basic JSON-RPC implementation for your Flask-powered sites.

Some reasons you might want to use:

  • Simple, powerful, flexible and pythonic API.
  • Support JSON-RPC 2.0 version.
  • Support python 3.6 or later.
  • The web browsable API.
  • Run-time type checking functions defined with PEP 484 argument (and return) type annotations.
  • Extensive documentation, and great community support.

There is a live example API for testing purposes, available here.

Below: Screenshot from the browsable API

Web browsable API

Adding Flask JSON-RPC to your application

  1. Installation
    $ pip install Flask-JSONRPC

or

    $ git clone git://github.com/cenobites/flask-jsonrpc.git
    $ cd flask-jsonrpc
    $ python setup.py install
  1. Getting Started

Create your application and initialize the Flask-JSONRPC.

    from flask import Flask
    from flask_jsonrpc import JSONRPC

    app = Flask(__name__)
    jsonrpc = JSONRPC(app, '/api', enable_web_browsable_api=True)

Write JSON-RPC methods.

    @jsonrpc.method('App.index')
    def index() -> str:
        return 'Welcome to Flask JSON-RPC'

All code of example run.py.

  1. Running
    $ python run.py
     * Running on http://0.0.0.0:5000/
  1. Testing
    $ curl -i -X POST \
       -H "Content-Type: application/json; indent=4" \
       -d '{
        "jsonrpc": "2.0",
        "method": "App.index",
        "params": {},
        "id": "1"
    }' http://localhost:5000/api
    HTTP/1.0 200 OK
    Content-Type: application/json
    Content-Length: 77
    Server: Werkzeug/0.8.3 Python/2.7.3
    Date: Fri, 14 Dec 2012 19:26:56 GMT

    {
      "jsonrpc": "2.0",
      "id": "1",
      "result": "Welcome to Flask JSON-RPC"
    }

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].