Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
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


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.0.tar.gz (4.1 kB) Copy SHA256 Checksum SHA256 Source Dec 16, 2016

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