Skip to main content

Python microservice framework

Project description Documentation Status

What is this package for

I’ve used different python frameworks for data serialisation many times. Mostly when I had to implement an API for my work. I felt many times those frameworks did good job but not extensible enough. Also writing easily an API which is satisfy every expectations of projects, without coupled restrictions sometimes really hard.


from pyrs import schema

class UserSchema(schema.Object):
    version = schema.Version(version='1.0')
    username = schema.StringField(required=True)
    password = schema.StringField(required=True, tags=['writeonly'])
    email = schema.EmailField(title='Registered email address')

writer = schema.JSONWriter(UserSchema)
jsonstring = writer.write(data) # The validation also happen

schemawriter = schema.JSONSchemaWriter()
jsonschemastr = writer.write(UserSchema)


  • Easy schema definition
  • Schema validation
  • Decoupled serialisation, validation
  • Extensible API


The code is tested with python 2.7, 3.3, 3.4.

$ pip install pyrs-schema


See requirements.txt. But The goal is less dependency as possible. The main dependency is the python jsonchema The validation is using that package.

Notice that even it’s a JSON schema validator this work still can be used for any (compatible) schema validation.

Important caveats

This code is in beta version. I working hard on write stable as possible API in the first place but while this code in 0.x version you should expect some major modification on the API.

The ecosystem

This work is part of pyrs framework. The complete framework follow the same intention to implement flexible solution.


I really welcome any comments! I would be happy if you fork my code or create pull requests. I’ve already really strong opinions what I want to achieve and how, though any help would be welcomed.

Feel free drop a message to me!

Download files

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

Files for pyrs-schema, version 0.7.3
Filename, size File type Python version Upload date Hashes
Filename, size pyrs-schema-0.7.3.tar.gz (13.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page