Flask + marshmallow for beautiful APIs

Overview

Flask-Marshmallow

Latest version Build status Documentation marshmallow 3 compatible code style: black

Flask + marshmallow for beautiful APIs

Flask-Marshmallow is a thin integration layer for Flask (a Python web framework) and marshmallow (an object serialization/deserialization library) that adds additional features to marshmallow, including URL and Hyperlinks fields for HATEOAS-ready APIs. It also (optionally) integrates with Flask-SQLAlchemy.

Get it now

pip install flask-marshmallow

Create your app.

from flask import Flask
from flask_marshmallow import Marshmallow

app = Flask(__name__)
ma = Marshmallow(app)

Write your models.

from your_orm import Model, Column, Integer, String, DateTime


class User(Model):
    email = Column(String)
    password = Column(String)
    date_created = Column(DateTime, auto_now_add=True)

Define your output format with marshmallow.

class UserSchema(ma.Schema):
    class Meta:
        # Fields to expose
        fields = ("email", "date_created", "_links")

    # Smart hyperlinking
    _links = ma.Hyperlinks(
        {
            "self": ma.URLFor("user_detail", values=dict(id="<id>")),
            "collection": ma.URLFor("users"),
        }
    )


user_schema = UserSchema()
users_schema = UserSchema(many=True)

Output the data in your views.

@app.route("/api/users/")
def users():
    all_users = User.all()
    return users_schema.dump(all_users)


@app.route("/api/users/<id>")
def user_detail(id):
    user = User.get(id)
    return user_schema.dump(user)


# {
#     "email": "[email protected]",
#     "date_created": "Fri, 25 Apr 2014 06:02:56 -0000",
#     "_links": {
#         "self": "/api/users/42",
#         "collection": "/api/users/"
#     }
# }

http://flask-marshmallow.readthedocs.io/

Learn More

To learn more about marshmallow, check out its docs.

Project Links

License

MIT licensed. See the bundled LICENSE file for more details.

Comments
  • AttributeError: 'Marshmallow' object has no attribute 'ModelSchema'

    AttributeError: 'Marshmallow' object has no attribute 'ModelSchema'

    Using the latest 0.7.0. I installed the build on a different machine and I only get this error on this machine.

    Upon inspecting the module, marshmallow indeed does NOT have a ModelSchema. Is this a bug or have I screwed something up? I haven't upgraded anything and I don't get this error on a different machine (both are running the latest Ubuntu 16 LTS)

    Out[2]: <flask_marshmallow.Marshmallow at 0x7f96d8f2a9b0>
    
    In [3]: vars(marshmallow)
    Out[3]: 
    {'AbsoluteURLFor': flask_marshmallow.fields.AbsoluteURLFor,
     'AbsoluteUrlFor': flask_marshmallow.fields.AbsoluteURLFor,
     'Bool': marshmallow.fields.Boolean,
     'Boolean': marshmallow.fields.Boolean,
     'Constant': marshmallow.fields.Constant,
     'Date': marshmallow.fields.Date,
     'DateTime': marshmallow.fields.DateTime,
     'Decimal': marshmallow.fields.Decimal,
     'Dict': marshmallow.fields.Dict,
     'Email': marshmallow.fields.Email,
     'Field': marshmallow.fields.Field,
     'Float': marshmallow.fields.Float,
     'FormattedString': marshmallow.fields.FormattedString,
     'Function': marshmallow.fields.Function,
     'Hyperlinks': flask_marshmallow.fields.Hyperlinks,
     'Int': marshmallow.fields.Integer,
     'Integer': marshmallow.fields.Integer,
     'List': marshmallow.fields.List,
     'LocalDateTime': marshmallow.fields.LocalDateTime,
     'Method': marshmallow.fields.Method,
     'Nested': marshmallow.fields.Nested,
     'Number': marshmallow.fields.Number,
     'Raw': marshmallow.fields.Raw,
     'Schema': flask_marshmallow.schema.Schema,
     'Str': marshmallow.fields.String,
     'String': marshmallow.fields.String,
     'Time': marshmallow.fields.Time,
     'TimeDelta': marshmallow.fields.TimeDelta,
     'URL': marshmallow.fields.Url,
     'URLFor': flask_marshmallow.fields.URLFor,
     'UUID': marshmallow.fields.UUID,
     'Url': marshmallow.fields.Url,
     'UrlFor': flask_marshmallow.fields.URLFor}
    

    Thanks.

    opened by mosdevly 13
  • Validation does not raise a ValidationError

    Validation does not raise a ValidationError

    When serializing data using Schema().load, a ValidationError does not get raised; instead, I get an UnmarshalResult object with the data and errors. Is this the expected output? does flask-marshmallow not raise a ValidationError when there are errors in the submitted data?

    Example:

    >>> from project.schemas import TermSchema
    >>> term_schema = TermSchema()
    >>> term_data = dict(term=None)
    >>> term_schema.load(term_data)
    UnmarshalResult(data={}, errors={'term': ['Field may not be null.']})
    

    Why is it returning an UnmarshalResult object instead of raising a validation error?

    Here is the schemas.py:

    from marshmallow import post_load
    from project.models import Term, Translation
    from flask_marshmallow import Marshmallow
    from marshmallow_sqlalchemy import field_for
    
    ma = Marshmallow()
    
    class TranslationSchema(ma.ModelSchema):
        class Meta:
            model = Translation
    
    class TermSchema(ma.ModelSchema):
        term = field_for(Term, 'term', required=True)
    
        class Meta:
            model = Term
        translations = ma.Nested(TranslationSchema, many=True)
    
        # Validate term is not none
        # Validate full_term is not none if is_acronym
        @post_load
        def make_term(self, data):
            return data
    
    opened by adyouri 11
  • Can you dynamically exclude fields on dump?

    Can you dynamically exclude fields on dump?

    I have some nested schemas:

    class ParentSchema(Schema):
        id = fields.Int()
        uri = fields.Url('')
        children = fields.Nested('ChildSchema', many=True, exclude=('parent',))
    
    class ChildSchema(Schema):
        id = fields.Int()
        f = fields.String()
        parent = fields.Nested('ParentSchema', exclude=('children',))
    

    It all works fine except that when I'm calling dump on the schema, calling parent.children results in a ginormous database query. The object being dumped is a SqlAlechemy object, and calling its children property results in lazy loading of those children from the database. The code looks like this:

    parents = Parent.all()
    schema = GameSchema()
    results = schema.dump(parents, many=True)
    

    I this particular case, I only need the parent records. Loading the children is wasted effort. There are, however cases, when I do need the children to be loaded. For this reason, I can't just put load_only on the nested fields in the schema definitions.

    Is there any way to tell one call to dump to skip certain fields?

    opened by dland512 11
  • schema.jsonify list of sqlalchemy instances incompatible with flask.jsonify

    schema.jsonify list of sqlalchemy instances incompatible with flask.jsonify

    @ElvisTheKing @sloria

    continuing where #19 left off...

    I am trying to use flask-marshmallow schema.jsonify on the result of a sqlalchemy query

    Using model instance is ok

    from models.equipment import Equipment
    equipments = Equipment.query.all()
    equipments_schema.jsonify(equipments[0]).response
    
    #('{\n  "date_added": "2015-10-23T11:07:46.384414+00:00", \n  "id": 1, \n  "name": "beacon"\n}', '\n')
    

    List of model instances breaks

    equipments_schema.jsonify(equipments)
    
    #*** AttributeError: "id" is not a valid field for [<app.models.equipment.Equipment object at 0x7f5b3c11c240>, <app.models.equipment.Equipment object at 0x7f5b3c11cba8>].
    

    versions

    Flask==0.10.1
    flask-marshmallow==0.6.2
    -e git+https://github.com/flask-restful/flask-restful.git@54c51fd88759e2f398d566040200d2c9d51b8e5f#egg=Flask_RESTful-master
    Flask-SQLAlchemy==2.0
    marshmallow==2.1.3
    marshmallow-sqlalchemy==0.6.0
    

    I think it's because the sqlalchemy query returns a list of model instances, which is not compatible with flask.jsonify. There's some discussion in flask about this, but it sounds like that'll never be supported.

    Am I missing something here? from the examples in the readme one might assume this should work.

    Otherwise, any thoughts for how to improve this?

    opened by jo-tham 11
  • Is there a specific way to format datetime in json?

    Is there a specific way to format datetime in json?

    Is there a specific way to format datetime in json?

    Some of my json dates come out as "Tue, 22 Sep 2015 10:17:00 GMT" and some come out as "2015-02-03T15:40:36.078358+00:00"

    opened by rlam3 10
  • from marshmallow import ( ImportError: cannot import name fields

    from marshmallow import ( ImportError: cannot import name fields

    I´m getting this when i try to run my project with Flask in a virtualenv

    Traceback (most recent call last): File "manage.py", line 10, in from flask_marshmallow import Marshmallow File "C:\Users\hcontreras\Documents\virtuales\MarketingProject\lib\site-packages\flask_marshmallow_init_.py", line 14, in from marshmallow import ( ImportError: cannot import name fields

    opened by handersonc 9
  • return self.session.query( AttributeError: 'DummySession' object has no attribute 'query'

    return self.session.query( AttributeError: 'DummySession' object has no attribute 'query'

    Hey guys, this is my first post of publication and I speak Spanish, I am very sorry if you do not understand me clearly, this is my problem I am using flask-marshmallow in its version 0.9.0 and when I create my table if I add primary_key = True to any field that is not id (Integer) like social number I get this error (Title), and this error:

    Traceback (most recent call last):
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\app.py", line 2309, in __call__
        return self.wsgi_app(environ, start_response)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\app.py", line 2295, in wsgi_app
        response = self.handle_exception(e)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask_restful\__init__.py", line 273, in error_router
        return original_handler(e)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\app.py", line 1741, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\_compat.py", line 34, in reraise
        raise value.with_traceback(tb)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\app.py", line 2292, in wsgi_app
        response = self.full_dispatch_request()
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request
        rv = self.handle_user_exception(e)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask_restful\__init__.py", line 273, in error_router
        return original_handler(e)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\app.py", line 1718, in handle_user_exception
        reraise(exc_type, exc_value, tb)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\_compat.py", line 34, in reraise
        raise value.with_traceback(tb)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request
        rv = self.dispatch_request()
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\app.py", line 1799, in dispatch_request
        return self.view_functions[rule.endpoint](**req.view_args)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask_restful\__init__.py", line 480, in wrapper
        resp = resource(*args, **kwargs)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask\views.py", line 88, in view
        return self.dispatch_request(*args, **kwargs)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask_restful\__init__.py", line 595, in dispatch_request
        resp = meth(*args, **kwargs)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\flask_jwt_extended\view_decorators.py", line 103, in wrapper
        return fn(*args, **kwargs)
      File "C:\Users\user\Documents\OverBit\Apiv2\resource\student.py", line 41, in post
        student=student_schema.load(student_data)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\marshmallow_sqlalchemy\schema.py", line 194, in load
        return super(ModelSchema, self).load(data, *args, **kwargs)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\marshmallow\schema.py", line 504, in load
        postprocess=True,
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\marshmallow\schema.py", line 640, in _do_load
        original_data=data,
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\marshmallow\schema.py", line 820, in _invoke_load_processors
        data=data, many=many, original_data=original_data,
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\marshmallow\schema.py", line 938, in _invoke_processors
        data = processor(data)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\marshmallow_sqlalchemy\schema.py", line 176, in make_instance
        instance = self.instance or self.get_instance(data)
      File "C:\Users\user\.virtualenvs\Apiv2-zDC9aQiw\lib\site-packages\marshmallow_sqlalchemy\schema.py", line 161, in get_instance
        return self.session.query(
    AttributeError: 'DummySession' object has no attribute 'query'
    

    this error is fixed just when my primary key is id (int) Is there a way for my primary key to be a string?

    opened by dani16antonio 8
  • update hyperlinkrelated to gracefully support nullable / non-required sqla relations

    update hyperlinkrelated to gracefully support nullable / non-required sqla relations

    I have nullable relations on my SQLAlchemy models that blow up when deserializing HyperlinkRelated. Patch allows for graceful failure when base field is not-required.

    Similar to the issue listed here: https://github.com/marshmallow-code/flask-marshmallow/issues/18

    opened by feigner 8
  • Integration of Flask, Flask-marshmallow and MongoAlchemy

    Integration of Flask, Flask-marshmallow and MongoAlchemy

    Hello, I tried the following code:

    from flask import Flask, request
    from flask_mongoalchemy import MongoAlchemy
    from flask_marshmallow import Marshmallow
    
    app = Flask(__name__)
    app.config['MONGOALCHEMY_DATABASE'] = 'flask-alchemy'
    app.config['MONGOALCHEMY_USER'] = 'user'
    app.config['MONGOALCHEMY_PASSWORD'] = 'password'
    app.config['MONGOALCHEMY_SERVER_AUTH'] = False
    db = MongoAlchemy(app)
    ma = Marshmallow(app)
    
    class Author(db.Document):
        name = db.StringField()
    
    class AuthorSchema(ma.ModelSchema):
        class Meta:
            model = Author
    
    author_schema = AuthorSchema()
    authors_schema = AuthorSchema(many=True)
    
    # mark_pilgrim = Author(name='Mark Pilgrim')
    # mark_pilgrim.save()
    
    @app.route("/author", methods=['POST'])
    def addUser():
        # author = Author(name=request.json['name'])
        author_result = author_schema.load(request.json)
        author_result.data.save()
        return "OK"
    
    @app.route("/author/<id>", methods=['GET'])
    def getUser(id):
        author = Author.query.get(id)
        return author_schema.jsonify(author)
    
    if __name__ == '__main__':
        app.run(host='0.0.0.0', port=9090)
    

    But application is not starting because of following error:

    Traceback (most recent call last):
      File "/home/nurgasemetey/IDES/pycharm-2017.2/helpers/pydev/pydevd.py", line 1596, in <module>
        globals = debugger.run(setup['file'], None, None, is_module)
      File "/home/nurgasemetey/IDES/pycharm-2017.2/helpers/pydev/pydevd.py", line 1023, in run
        pydev_imports.execfile(file, globals, locals)  # execute the script
      File "/media/nurgasemetey/2321222d-3af5-46b5-b8c5-824322db7a26/nurgasemetey-environment/PyCharm/PYCHARM_PROJECTS/flask-alchemy-mongo/Test.py", line 16, in <module>
        class AuthorSchema(ma.ModelSchema):
      File "/usr/local/lib/python2.7/dist-packages/marshmallow/schema.py", line 118, in __new__
        dict_cls=dict_cls
      File "/usr/local/lib/python2.7/dist-packages/marshmallow_sqlalchemy/schema.py", line 60, in get_declared_fields
        declared_fields = mcs.get_fields(converter, opts, base_fields, dict_cls)
      File "/usr/local/lib/python2.7/dist-packages/marshmallow_sqlalchemy/schema.py", line 94, in get_fields
        dict_cls=dict_cls,
      File "/usr/local/lib/python2.7/dist-packages/marshmallow_sqlalchemy/convert.py", line 93, in fields_for_model
        for prop in model.__mapper__.iterate_properties:
    AttributeError: type object 'Author' has no attribute '__mapper
    

    What can be wrong?

    Versions

    Flask==0.12 flask-marshmallow==0.8.0 Flask-MongoAlchemy==0.7.2 SQLAlchemy==1.1.11

    opened by nurgasemetey 6
  • FR: Flask config field

    FR: Flask config field

    I currently am passing a lot of current_app.config[...] settings into schemas.

    Would there be use for a FlaskConfig class? You'd give it a field class to use in serialisation (defaults to fields.String), the configuration variable name (defaults to the field name, uppercased), and use this to serialise the current value from current_app.config.

    This would go very nicely with the current URLFor / AbsoluteURLFor fields. Example based on an active project:

    class ItemPresets(Schema):
        monty = ma.FlaskConfig(ma.Integer, "ACME_MONTY_PRESET")
        viking = ma.FlaskConfig(ma.Integer, "ACME_VIKING_PRESET")
    
    class AcmeConfig(Schema):
        data_endpoint = ma.AbsoluteURLFor("rest.ham_collection")
        some_api_access_token = ma.FlaskConfig()  # serializes SOME_API_ACCESS_TOKEN as a string field.
        acme_presets = ma.Nested(ItemPresets, default=dict)
    

    The field type defaults to String and config name to the uppercased field name.

    Note that the field should probably default to dump_only=True, you wouldn't want to use this for incoming data, setting your configuration on deserialization, unless explicitly set do to so.

    opened by mjpieters 5
  • Got Vulnerability while feeding request.get_json() data to marshmallow directly .

    Got Vulnerability while feeding request.get_json() data to marshmallow directly .

    I am using flask-marshmallow for user input validation .

    from marshmallow import Schema, fields, validate
    
    
    class UserSchema(Schema):
        username = fields.String(required=True,
                                validate=[validate.Length(min=1, error="Field should not be empty.")])
        pincode = fields.Integer(required=True, validate=validate.Range(
            min=0, error="pincode is invalid, it should be a positive integer."))
    

    In application controller part :

    class UserDetails(Resource):
        user_schema_obj = UserSchema()
        def post(self):
            if not request.is_json:
                return make_response(jsonify(error_dict(
                    current_request_id(), "Unsupported media type, Requests must be JSON",
                    415)), status.HTTP_415_UNSUPPORTED_MEDIA_TYPE)
    
            if not request.json:
                return make_response(jsonify(error_dict(
                    current_request_id(), "Required parameter not found",
                    400)), status.HTTP_400_BAD_REQUEST)
            request_jsn = UserDetails.user_schema_obj.load(request.get_json())
            username = request_jsn['username']
            pincode = request_jsn['pincode']
    

    This is the way i am feeding user input to marshmallow schema . when i am doing app scan it saying gets user input from element **get_json**. This element’s value flows through the code without being properly sanitized or validated and is eventually stored in the server-side Session object, in post. This constitutes a Trust Boundary Violation. Dont know how to resolve this ? Please help!

    opened by vvksahoo 5
  • Solve deprecation flask sqlalchemy 3

    Solve deprecation flask sqlalchemy 3

    Fixes #247.

    Also includes the changes from https://github.com/marshmallow-code/flask-marshmallow/pull/248 as otherwise the changes cannot be committed.

    opened by woutervanoorschot 0
  • Pin black importlib metadata dependencies

    Pin black importlib metadata dependencies

    There is no 0.x next release branch and as such I have created this PR to dev (in conflict with the contributing guidelines)

    It fixes errors in the pre commit linting caused by an exception in black 22.1.0 and a deprecation from importlib-metadata >= 5.

    Hopefully this is useful and can be merged.

    opened by woutervanoorschot 2
  • DeprecationWarning from Flask-SQLAlchemy for app.extensions[

    DeprecationWarning from Flask-SQLAlchemy for app.extensions["sqlalchemy"]

    Flask-SQLAlchemy has rewritten the way to load the extension. No longer app.extensions["sqlalchemy"].db but simply app.extensions["sqlalchemy"] see https://github.com/pallets-eco/flask-sqlalchemy/issues/698.

    This is used here: https://github.com/marshmallow-code/flask-marshmallow/blob/13f673979937bc5b366863eeff4eefadfb8433d1/src/flask_marshmallow/init.py#L114

    This is a breaking change and would require to also pin Flask-SQLAlchemy to >3.0 in https://github.com/marshmallow-code/flask-marshmallow/blob/13f673979937bc5b366863eeff4eefadfb8433d1/setup.py#L7

    opened by woutervanoorschot 0
  • How do I create a new ORM object with information passed via JSON?

    How do I create a new ORM object with information passed via JSON?

    I have an ORM class created with SQLAlchemy, example:

    class Person(Base):
        name = Column(String,nullable=False)
        birthdate = Column(String,CheckConstraint("birthdate >= '1970-01-01'")
        ssn = Column(String,primary_key=True)
    

    My Flask app will be in charge of retrieving and inserting ORM objects like so:

    @app.route("/people/<ssn>/insert",methods=["PUT"])
    def insert_person(ssn):
        # insert person into database
    

    The information to be inserted will be provided within the request, via a JSON string, ex: {"name":"Bobby Burger","ssn":"123-45-6789"} I already have a schema defined that I won't mention here.

    I want to create an ORM object filled with the information provided. How do I do this?

    opened by moonman239 0
  • Better Separation of Duties

    Better Separation of Duties

    Hi Team - Love the repo and thank you. As you can imagine, once you begin to create larger and larger applications, the number of routes, models and schemas begin to increase, and become increasingly complex. Could you refactor your code to show how you would recommend separating your Marshmallow/SQLAlchemy Models from the main Flask app/routes? Right now you're instantiating the marshmallow object (ma) inside the main app.py file and then creating Marshmallow schemas below it. When you start having dozens or more tables/models this becomes unwieldy and increases the blast radius of app.py.

    Thanks!

    opened by diloreto 0
Owner
marshmallow-code
Python object serialization and deserialization, lightweight and fluffy
marshmallow-code
Flask-vs-FastAPI - Understanding Flask vs FastAPI Web Framework. A comparison of two different RestAPI frameworks.

Flask-vs-FastAPI Understanding Flask vs FastAPI Web Framework. A comparison of two different RestAPI frameworks. IntroductionIn Flask is a popular mic

Mithlesh Navlakhe 1 Jan 1, 2022
The template for building scalable web APIs based on FastAPI, Tortoise ORM and other.

FastAPI and Tortoise ORM. Powerful but simple template for web APIs w/ FastAPI (as web framework) and Tortoise-ORM (for working via database without h

prostomarkeloff 95 Jan 8, 2023
CLI and Streamlit applications to create APIs from Excel data files within seconds, using FastAPI

FastAPI-Wrapper CLI & APIness Streamlit App Arvindra Sehmi, Oxford Economics Ltd. | Website | LinkedIn (Updated: 21 April, 2021) fastapi-wrapper is mo

Arvindra 49 Dec 3, 2022
Easy and secure implementation of Azure AD for your FastAPI APIs 🔒

FastAPI-Azure-auth Azure AD Authentication for FastAPI apps made easy. ?? Description FastAPI is a modern, fast (high-performance), web framework for

Intility 216 Dec 27, 2022
Qwerkey is a social media platform for connecting and learning more about mechanical keyboards built on React and Redux in the frontend and Flask in the backend on top of a PostgreSQL database.

Flask React Project This is the backend for the Flask React project. Getting started Clone this repository (only this branch) git clone https://github

Peter Mai 22 Dec 20, 2022
A basic JSON-RPC implementation for your Flask-powered sites

Flask JSON-RPC A basic JSON-RPC implementation for your Flask-powered sites. Some reasons you might want to use: Simple, powerful, flexible and python

Cenobit Technologies 273 Dec 1, 2022
Mixer -- Is a fixtures replacement. Supported Django, Flask, SqlAlchemy and custom python objects.

The Mixer is a helper to generate instances of Django or SQLAlchemy models. It's useful for testing and fixture replacement. Fast and convenient test-

Kirill Klenov 871 Dec 25, 2022
A Flask extension that enables or disables features based on configuration.

Flask FeatureFlags This is a Flask extension that adds feature flagging to your applications. This lets you turn parts of your site on or off based on

Rachel Greenfield 131 Sep 26, 2022
Regex Converter for Flask URL Routes

Flask-Reggie Enable Regex Routes within Flask Installation pip install flask-reggie Configuration To enable regex routes within your application from

Rhys Elsmore 48 Mar 7, 2022
Socket.IO integration for Flask applications.

Flask-SocketIO Socket.IO integration for Flask applications. Installation You can install this package as usual with pip: pip install flask-socketio

Miguel Grinberg 4.9k Jan 3, 2023
Formatting of dates and times in Flask templates using moment.js.

Flask-Moment This extension enhances Jinja2 templates with formatting of dates and times using moment.js. Quick Start Step 1: Initialize the extension

Miguel Grinberg 358 Nov 28, 2022
Pagination support for flask

flask-paginate Pagination support for flask framework (study from will_paginate). It supports several css frameworks. It requires Python2.6+ as string

Lix Xu 264 Nov 7, 2022
Adds GraphQL support to your Flask application.

Flask-GraphQL Adds GraphQL support to your Flask application. Usage Just use the GraphQLView view from flask_graphql from flask import Flask from flas

GraphQL Python 1.3k Dec 31, 2022
flask extension for integration with the awesome pydantic package

flask extension for integration with the awesome pydantic package

null 249 Jan 6, 2023
Restful Api developed with Flask using Prometheus and Grafana for monitoring and containerization with Docker :rocket:

Hephaestus ?? In Greek mythology, Hephaestus was either the son of Zeus and Hera or he was Hera's parthenogenous child. ... As a smithing god, Hephaes

Yasser Tahiri 16 Oct 7, 2022
Single Page App with Flask and Vue.js

Developing a Single Page App with FastAPI and Vue.js Want to learn how to build this? Check out the post. Want to use this project? Build the images a

null 91 Jan 5, 2023
Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

Beyonic API Python Examples. The beyonic APIs Doc Reference: https://apidocs.beyonic.com/ To start using the Beyonic API Python API, you need to start

Harun Mbaabu Mwenda 46 Sep 1, 2022
Flask + marshmallow for beautiful APIs

Flask-Marshmallow Flask + marshmallow for beautiful APIs Flask-Marshmallow is a thin integration layer for Flask (a Python web framework) and marshmal

marshmallow-code 659 Feb 15, 2021
Flask + marshmallow for beautiful APIs

Flask-Marshmallow Flask + marshmallow for beautiful APIs Flask-Marshmallow is a thin integration layer for Flask (a Python web framework) and marshmal

marshmallow-code 768 Dec 22, 2022
Flask-Rebar combines flask, marshmallow, and swagger for robust REST services.

Flask-Rebar Flask-Rebar combines flask, marshmallow, and swagger for robust REST services. Features Request and Response Validation - Flask-Rebar reli

PlanGrid 223 Dec 19, 2022