All Projects → biosustain → Potion

biosustain / Potion

Licence: other
Flask-Potion is a RESTful API framework for Flask and SQLAlchemy, Peewee or MongoEngine

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Potion

Full Stack
Full stack, modern web application generator. Using Flask, PostgreSQL DB, Docker, Swagger, automatic HTTPS and more.
Stars: ✭ 451 (-6.82%)
Mutual labels:  sqlalchemy, flask
Flask Restplus Boilerplate
A boilerplate for flask restful web service
Stars: ✭ 466 (-3.72%)
Mutual labels:  sqlalchemy, flask
The Flask Mega Tutorial
📖《The Flask Mega-Tutorial》中文2018最新版📗
Stars: ✭ 221 (-54.34%)
Mutual labels:  sqlalchemy, flask
Flusk
Boilerplate API on how to structure big Flask applications (includes SQLAlchemy, Docker, nginx)
Stars: ✭ 165 (-65.91%)
Mutual labels:  sqlalchemy, flask
Flask Sqlacodegen
🍶 Automatic model code generator for SQLAlchemy with Flask support
Stars: ✭ 283 (-41.53%)
Mutual labels:  sqlalchemy, flask
Pytest Flask Sqlalchemy
A pytest plugin for preserving test isolation in Flask-SQLAlchemy using database transactions.
Stars: ✭ 168 (-65.29%)
Mutual labels:  sqlalchemy, flask
Flask Base
A simple Flask boilerplate app with SQLAlchemy, Redis, User Authentication, and more.
Stars: ✭ 2,680 (+453.72%)
Mutual labels:  sqlalchemy, flask
Flask Graphene Sqlalchemy
A demo project for Flask + GraphQL (With Graphene & SQLAlchemy)
Stars: ✭ 117 (-75.83%)
Mutual labels:  sqlalchemy, flask
Mini Shop Server
基于 Flask 框架开发的微信小程序后端项目,用于构建小程序商城后台 (电商相关;rbac权限管理;附带自动生成Swagger 风格的API 文档;可作「Python 项目毕设」;慕课网系列)---- 相关博客链接:🌟
Stars: ✭ 446 (-7.85%)
Mutual labels:  sqlalchemy, flask
Safrs
SqlAlchemy Flask-Restful Swagger Json:API OpenAPI
Stars: ✭ 255 (-47.31%)
Mutual labels:  sqlalchemy, flask
Flask Msearch
Full text search for flask.
Stars: ✭ 164 (-66.12%)
Mutual labels:  sqlalchemy, flask
Enferno
A Python framework based on Flask microframework, with batteries included, and best practices in mind.
Stars: ✭ 385 (-20.45%)
Mutual labels:  sqlalchemy, flask
Flask Restless Security
Concise skeleton for development of Flask, Flask-Restless, SQLAlchemy, JWT based REST APIs.
Stars: ✭ 159 (-67.15%)
Mutual labels:  sqlalchemy, flask
Eve Sqlalchemy
SQLAlchemy data layer for Eve-powered RESTful APIs
Stars: ✭ 215 (-55.58%)
Mutual labels:  sqlalchemy, flask
Tedivms Flask
Flask starter app with celery, bootstrap, and docker environment
Stars: ✭ 142 (-70.66%)
Mutual labels:  sqlalchemy, flask
Autoline
建议你使用更新的AutoLink平台
Stars: ✭ 227 (-53.1%)
Mutual labels:  sqlalchemy, flask
Weeklyreport
基于Flask的开源周报系统,快速docker部署
Stars: ✭ 102 (-78.93%)
Mutual labels:  sqlalchemy, flask
Flask Graphene Sqlalchemy
⚗️Project template to build a GraphQL API in Python
Stars: ✭ 109 (-77.48%)
Mutual labels:  sqlalchemy, flask
Flask Boilerplate
Simple flask boilerplate with Postgres, Docker, and Heroku/Zeit now
Stars: ✭ 251 (-48.14%)
Mutual labels:  sqlalchemy, flask
Flask Sqlalchemy
Adds SQLAlchemy support to Flask
Stars: ✭ 3,658 (+655.79%)
Mutual labels:  sqlalchemy, flask

============ Flask-Potion

.. image:: https://img.shields.io/travis/biosustain/potion/master.svg?style=flat-square :target: https://travis-ci.org/biosustain/potion

.. image:: https://img.shields.io/coveralls/biosustain/potion/master.svg?style=flat-square :target: https://coveralls.io/r/biosustain/potion

.. image:: https://img.shields.io/pypi/v/Flask-Potion.svg?style=flat-square :target: https://pypi.python.org/pypi/Flask-Potion

.. image:: https://img.shields.io/pypi/l/Flask-Potion.svg?style=flat-square :target: https://pypi.python.org/pypi/Flask-Potion

.. image:: https://badges.gitter.im/Join%20Chat.svg :alt: Join the chat at https://gitter.im/biosustain/potion :target: https://gitter.im/biosustain/potion?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

|

.. image:: https://raw.githubusercontent.com/biosustain/potion/master/docs/_static/Potion.png :alt: Flask-Potion :align: center :height: 150

Description

Flask-Potion is a powerful Flask extension for building RESTful JSON APIs. Potion features include validation, model resources and routes, relations, object permissions, filtering, sorting, pagination, signals, and automatic API schema generation.

Potion ships with backends for SQLAlchemy, peewee and MongoEngine models. It is possible to add backends for other data stores, or even to use a subset of Potion without any data store at all.

API client libraries for Python <https://github.com/biosustain/potion-client>_ and JavaScript/TypeScript <https://github.com/biosustain/potion-node>_ (generic Node as well as AngularJS and Angular) are available.

User's Guide ^^^^^^^^^^^^

The user's guide and documentation is published here:

http://potion.readthedocs.org/ <http://potion.readthedocs.org/en/latest/>_

Versioning ^^^^^^^^^^

Potion will use semantic versioning from v1.0.0. Until then, the minor version is used for changes known to be breaking.

Features

  • Powerful API framework both for data-store-linked and plain resources

  • JSON-based and fully self-documenting with JSON Hyper-Schema

  • Backend integrations:

    • Flask-SQLAlchemy
    • Peewee (contributed by Michael Lavers <https://github.com/kolanos>_)
    • Flask-MongoEngine
  • Filtering, sorting, pagination, validation, built right in

  • Smart system for handling relations between resources

  • Natural keys for extra simple relation querying

  • Easy-to-use, yet highly flexible, optional permissions system

  • Signals for pre- and post-processing of requests

  • Very customizable — everything is just a resource, route, or schema

  • Access APIs more easily with client libraries for Python <https://github.com/biosustain/potion-client>_ and JavaScript/TypeScript <https://github.com/biosustain/potion-node>_

Example (SQLAlchemy)

.. code-block:: python

from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_potion import Api, ModelResource, fields
from flask_potion.routes import ItemRoute

app = Flask(__name__)
db = SQLAlchemy(app)
api = Api(app)

class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(), nullable=False)

db.create_all()

class UserResource(ModelResource):
    class Meta:
        model = User

    @ItemRoute.GET
    def greeting(self, user) -> fields.String():
        return "Hello, {}!".format(user.name)

api.add_resource(UserResource)

if __name__ == '__main__':
    app.run()

Authors

Potion is written and maintained by Lars Schöning <https://github.com/lyschoening>_.

Peewee <https://peewee.readthedocs.org/en/latest/>_ backend support has been contributed by Michael Lavers <https://github.com/kolanos>_.

MongoEngine <http://mongoengine.org/>_ backend support has been contributed by João Cardoso <https://github.com/joaocardoso>_.

See here for the full list of contributors <https://github.com/biosustain/potion/graphs/contributors>_.

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