Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Simple Serializers for API validations

Project Description
# Flask-Simple-Serializer

Simple Serializer to valid API request

### Usage

from flask_simple_serializer.serializers import Serializer
from flask_simple_serializer import StringField, BooleanField, EmailField, validators

class Userserializer(Serializer):
username = StringField('Username')
email = EmailField('Email Address', [validators.Length(min=4, max=25)])
accept_rules = BooleanField('I accept the site rules', [validators.InputRequired()])

def create_user(self):

from flask_simple_serializer.response import Response
from flask_simple_serializer.status_code import HTTP_200_OK, HTTP_400_BAD_REQUEST

from my_app.serializes import Userserializer

def user_registration():
serializer = UserSerializer(request.json)

if serializer.is_valid()
# Do something
return Response(status_code=HTTP_200_OK)
return Response(serializer.errors, status_code=HTTP_400_BAD_REQUEST)

### TODO
- Model Serializer
- Serializer that accept Model instance (SqlAlchemy)
- Improve Documentation
- Custom Felds
- Parse request decorators
- Test for Response and Status Codes
Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Flask_Simple_Serializer-1.1.3-py3-none-any.whl (7.6 kB) Copy SHA256 Checksum SHA256 py3 Wheel Jan 17, 2017
Flask-Simple-Serializer-1.1.3.tar.gz (5.3 kB) Copy SHA256 Checksum SHA256 Source Jan 17, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting