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

This version
History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(7.6 kB) Copy SHA256 Hash SHA256
Wheel py3 Jan 17, 2017
(5.3 kB) Copy SHA256 Hash SHA256
Source None Jan 17, 2017

Supported By

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 Google Google Cloud Servers DreamHost DreamHost Log Hosting