Top "Marshmallow" questions

Marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes.

Is it possible to validate list using marshmallow?

Is it possible to validate list using marshmallow? class SimpleListInput(Schema): items = fields.List(fields.String(), required=True) # expected invalid …

python marshmallow
How to serialize a Marshmallow field under a different name

I want a Marshmallow Schema with the following output json - { "_id": "aae216334c3611e78a3e06148752fd79", "_time": 20.79606056213379, "more_…

python json python-2.7 marshmallow
Short way to serialize datetime with marshmallow

Here is my situation: I store some datetime in MSSQL, which i get in my python application via SQLAlchemy, and …

python sql-server serialization sqlalchemy marshmallow
Update row (SQLAlchemy) with data from marshmallow

I'm using Flask, Flask-SQLAlchemy, Flask-Marshmallow + marshmallow-sqlalchemy, trying to implement REST api PUT method. I haven't found any tutorial using SQLA …

python flask flask-sqlalchemy marshmallow
Mongoengine : How to update specific fields of an existing document?

I have an existing mongo document which has been exposed over a REST API. The API request will contain certain …

flask mongoengine marshmallow
Serialize two nested schema with marshmallow

I am fairly new to python. I have two SQLAlchemy models as follows: class listing(db.Model): id = db.Integer(…

python flask-sqlalchemy marshmallow
Flask Marshmallow/SqlAlchemy: Serializing many-to-many relationships

I'm building a small REST api using Flask, flask-sqlalchemy and flask-marshmallow. For some requests I'd like to return a json …

python serialization flask flask-sqlalchemy marshmallow
'Marshmallow' object has no attribute 'ModelSchema'

Everything looks fine from the documentation but it still gives me this error when I'm running the app: File "main.…

python flask sqlalchemy marshmallow
top-level marshmallow schema validation

From Marshmallow#validation, I know I can register validators on specific fields in a Schema. If a validator fails, errors …

python marshmallow
SqlAlchemy Relationship and Marshmallow

I am trying to return JSON or even a complete string of a returned one to many sqlalchemy query. I …

json flask sqlalchemy marshmallow