Field types

Field field class

Reference field types

Basic field types

Composite field types

SQLAlchemy-specific field types

class flask_restone.ModelDict

For creating SQLAlchemy models without having to give them their own resource.

Usage example:

class FooResource(Resource):
   class Meta:
      model = Foo

   class Schema:
      # Here, Foo.bars is a collection of Bar items
      bars = List(ModelDict({"name": Str(description="Bar name"),
      "height": Int(description="Height of bar")}, model=Bar))
Parameters:
  • properties (dict) – A dictionary of Field objects

  • model – An SQLAlchemy model

Internal types

Field types

Schema types