├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Grigory Chernyshev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Awesome Python Models [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) 2 | A curated list of awesome Python libraries, which implement models, schemas, serializers/deserializers, ODM's/ORM's, Active Records or similar patterns. 3 | 4 | - [Awesome Python Models](#awesome-python-models) 5 | - [Model/Schema](#model-schema) 6 | - [ODM/ORM/Active Record](#odm-orm-active-record) 7 | - [Data/validation](#data-validation) 8 | - [Other resources](#other-resources) 9 | - [Other Awesome Lists](#other-awesome-lists) 10 | - [Contributing](#contributing) 11 | 12 | - - - 13 | 14 | ## Model, Schema 15 | *Libraries implementing some kind of model, letting you to serialize/deserialize python object to some data structures.* 16 | * :ghost: [ascetic](https://bitbucket.org/emacsway/ascetic) - Ascetic, a lightweight Python datamapper ORM. 17 | * ![alt text](https://avatars1.githubusercontent.com/u/25880274?v=3&s=32 "The attrs Cabal") 18 | [attrs](https://github.com/python-attrs/attrs) - Python Classes Without Boilerplate. 19 | * ![alt text](https://avatars2.githubusercontent.com/u/825580?v=3&s=32 "Jaime Gil de Sagredo Luna") 20 | [booby](https://github.com/jaimegildesagredo/booby) - data modeling and validation Python library. 21 | * ![alt text](https://avatars3.githubusercontent.com/u/5652479?v=3&s=32 "roronya") 22 | [causalmodels](https://github.com/roronya/causalmodels) - causal modeling in Python. 23 | * ![alt text](https://avatars2.githubusercontent.com/u/452227?v=3&s=32 "Pylons Project") 24 | [colander](https://github.com/Pylons/colander) - A serialization/deserialization/validation library for strings, mappings and lists. 25 | * ![alt text](https://avatars1.githubusercontent.com/u/824379?v=3&s=32 "tarvitz") 26 | [composite](https://github.com/tarvitz/composite/) - Declarative XML files parse, unparse with help of lxml library. 27 | * ![alt text](https://avatars0.githubusercontent.com/u/3585075?v=3&s=32 "datastore") 28 | [datastore.objects](https://github.com/datastore/datastore.objects) - simple object mapper on top of datastore (not relational). 29 | * ![alt text](https://avatars1.githubusercontent.com/u/574291?v=3&s=32 "Alfred Santacatalina Gea") 30 | [dirty-models](https://github.com/alfred82santa/dirty-models) - Dirty model for python. 31 | * [dejavu](http://www.aminus.net/dejavu/chrome/common/doc/2.0a/html/intro.html) - Dejavu is a thread-safe Object-Relational Mapper for Python applications. 32 | * ![alt text](https://avatars1.githubusercontent.com/u/723451?v=3&s=32 "Adrian Perez") 33 | [gnarl](https://github.com/aperezdc/gnarl) - Lightweight module to define serializable, schema-validated classes 34 | * ![alt text](https://avatars1.githubusercontent.com/u/124167?v=3&s=32 "Sebastian Heimann") 35 | [guts](https://github.com/emolch/guts) - Lightweight declarative YAML and XML data binding for Python. 36 | * ![alt text](https://avatars2.githubusercontent.com/u/29016?v=3&s=32 "Matt Good") 37 | [jsonmapper](https://github.com/mgood/jsonmapper) - Python JSON<->Object mapper. 38 | * ![alt text](https://avatars1.githubusercontent.com/u/956019?v=3&s=32 "Szczepan Cieślik") 39 | [jsonmodels](https://github.com/beregond/jsonmodels) - jsonmodels is library to make it easier for you to deal with structures that are converted to, or read from JSON. 40 | * ![alt text](https://avatars3.githubusercontent.com/u/1021723?v=3&s=32 "Max Kamenkov") 41 | [jsonobjects](https://github.com/caxap/jsonobjects) - jsonobjects allows you to declaratively specify how to extract and convert elements from a JSON document. 42 | * ![alt text](https://avatars1.githubusercontent.com/u/94514?v=3&s=32 "Dimagi") 43 | [jsonobject](https://github.com/dimagi/jsonobject) - A simple json-object mapping for Python. 44 | * :ghost: [jsonpickle](https://github.com/jsonpickle/jsonpickle) - Python library for serializing any arbitrary object graph into JSON. 45 | * ![alt text](https://avatars1.githubusercontent.com/u/488217?v=3&s=32 "Mike Waites") 46 | [kim](https://github.com/mikeywaites/kim) - A JSON Serialization and Marshaling framework. 47 | * ![alt text](https://avatars0.githubusercontent.com/u/111217?v=3&s=32 "Neil Isaac") 48 | [lazycontract](https://github.com/neilisaac/lazycontract) - Python library to define declarative contracts for serialization and deserialization. 49 | * ![alt text](https://avatars3.githubusercontent.com/u/87913??v=3&s=32 "Aurélien") 50 | [lupin](https://github.com/holinnn/lupin) - Python document object mapper (load python object from JSON and vice-versa). 51 | * ![alt text](https://avatars1.githubusercontent.com/u/10334301?v=3&s=32 "Python object serialization and deserialization, lightweight and fluffy") 52 | [marshmallow](https://github.com/marshmallow-code/marshmallow) - A lightweight library for converting complex objects to and from simple Python datatypes. 53 | * :ghost: [metaparams](https://github.com/mementum/metaparams) - Python meta framework for Parameters in classes. 54 | * ![alt text](https://avatars0.githubusercontent.com/u/6988?v=3&s=32 "Jamie Matthews") 55 | [micromodels](https://github.com/j4mie/micromodels) - Declarative dictionary-based model classes for Python. 56 | * ![alt text](https://avatars2.githubusercontent.com/u/27304?v=3&s=32 "Andy Mikhailenko") 57 | [monk](https://github.com/neithere/monk) - An unobtrusive data modeling, manipulation and validation library. 58 | * ![alt text](https://avatars3.githubusercontent.com/u/633032?v=3&s=32 "Hearsay Social") 59 | [normalize](https://github.com/hearsaycorp/normalize) - A toolkit for wrapping network data in Python objects. 60 | * ![alt text](https://avatars0.githubusercontent.com/u/9479519?v=3&s=32 "Caxiam") 61 | [model-api](https://github.com/caxiam/model-api) - For modeling remote APIs in an ORM fashion. 62 | * ![alt text](https://avatars2.githubusercontent.com/u/323018?v=3&s=32 "Marek Polak") 63 | [object-mapper](https://github.com/marazt/object-mapper) - ObjectMapper is a class for automatic object mapping in Python. 64 | * ![alt text](https://avatars3.githubusercontent.com/u/1693676?v=3&s=32 "IOAM") 65 | [param](https://github.com/ioam/param) - Make your Python code clearer and more reliable by declaring Parameters. 66 | * :ghost: [prettyrecord](https://github.com/skorczan/prettyrecord) - Structures like SQLAlchemy's declarative_base or Django's models in your project! 67 | * ![alt text](https://avatars3.githubusercontent.com/u/4039449?v=3&s=32 "Samuel Colvin") 68 | [pydantic](https://github.com/samuelcolvin/pydantic) - Data validation using Python 3.6 type hinting. 69 | * ![alt text](https://avatars3.githubusercontent.com/u/251374?v=3&s=32 "Spotify") 70 | [pyschema](https://github.com/spotify/pyschema) - Python library for class-based schema definition, object serialization and data validation. 71 | * ![alt text](https://avatars1.githubusercontent.com/u/2567468?v=3&s=32 "Trust Sanger Institute - Human Genetics Informatics") 72 | [python-json](https://github.com/wtsi-hgi/python-json) - Python library for easily JSON encoding/decoding complex class-based Python models, using an arbitrarily complex (but easy to write!) mapping schema. 73 | * ![alt text](https://avatars1.githubusercontent.com/u/922613?v=3&s=32 "30loops") 74 | [python-docar](https://github.com/30loops/python-docar) - A library for document oriented architectures. 75 | * ![alt text](https://avatars3.githubusercontent.com/u/1820812?v=3&s=32 "F-Secure Corporation") 76 | [resource-api](https://github.com/F-Secure/resource-api) - A framework that allows developers decoratively define resources and relationships between them. 77 | * ![alt text](https://avatars0.githubusercontent.com/u/7866441?v=3&s=32 "Schematics") 78 | [schematics](https://github.com/schematics/schematics) - Python Data Structures for Humans™. 79 | * ![alt text](https://avatars2.githubusercontent.com/u/275106?v=3&s=32 "Marrow Open Source Collective") 80 | [schema](https://github.com/marrow/schema/) - A generic declarative schema system. 81 | * ![alt text](https://avatars0.githubusercontent.com/u/152941?v=3&s=32 "Jordan McCoy") 82 | [scheme](https://github.com/jordanm/scheme) - A declarative schema framework for Python. 83 | * ![alt text](https://avatars1.githubusercontent.com/u/5894089?v=3&s=32 "Maksim Ekimovskii") 84 | [simple-models](https://github.com/prawn-cake/simple-models) - Simple models - keep your API messages in shape with validation and handy descriptors based object interface. 85 | * ![alt text](https://avatars1.githubusercontent.com/u/1730315?v=3&s=32 "Aljosha Friemann") 86 | [simple_model](https://github.com/afriemann/simple_model) - a very simple model framework for python. 87 | * ![alt text](https://avatars0.githubusercontent.com/u/939501?v=3&s=32 "Jace Browning") 88 | [yorm](https://github.com/jacebrowning/yorm) - Automatic object-YAML mapping for Python. 89 | 90 | 91 | ## ODM, ORM, Active Record 92 | *Libraries, implementing ODM/ORM/Active Record patterns, letting you to work with external objects (REST, DB) like normal python instances.* 93 | * ![alt text](https://avatars3.githubusercontent.com/u/2315?v=3&s=32 "dw") 94 | [acid](https://github.com/dw/acid) - SQLite for NoSQL. 95 | * :ghost: [butterdb](https://github.com/terrible-ideas/butterdb) - butterdb is a Python object mapper for Google Drive Spreadsheets. 96 | * ![alt text](https://avatars1.githubusercontent.com/u/27804?v=3&s=32 "Django") 97 | [django](https://github.com/django/django) - The Web framework for perfectionists with deadlines (includes ORM layer). 98 | * ![alt text](https://avatars2.githubusercontent.com/u/825580?v=3&s=32 "Jaime Gil de Sagredo Luna") 99 | [finch](https://github.com/jaimegildesagredo/finch) - Asynchronous RESTful API consumer for Python. 100 | * ![alt text](https://avatars1.githubusercontent.com/u/506791?v=3&s=32 "Steven Arcangeli") 101 | [flywheel](https://github.com/stevearc/flywheel) - Object mapper for Amazon's DynamoDB. 102 | * ![alt text](https://avatars3.githubusercontent.com/u/48549?v=3&s=32 "Brian Jinwright") 103 | [kev](https://github.com/capless/kev) - Python ORM for key-value stores. Currently supported backends are Redis, S3, and a S3/Redis hybrid backend. 104 | * ![alt text](https://avatars0.githubusercontent.com/u/3344584?v=3&s=32 "Center for Open Science") 105 | [modular-odm](https://github.com/CenterForOpenScience/modular-odm) - A database-agnostic Object-Document Mapper for Python. 106 | * ![alt text](https://avatars3.githubusercontent.com/u/1502485?v=3&s=32 "MongoEngine") 107 | [mongoengine](https://github.com/MongoEngine/mongoengine) - A Python Object-Document-Mapper for working with MongoDB. 108 | * ![alt text](https://avatars3.githubusercontent.com/u/555648?v=3&s=32 "Sébastien Eustace") 109 | [orator](https://github.com/sdispater/orator) - The Orator ORM provides a simple yet beautiful ActiveRecord implementation. 110 | * ![alt text](https://avatars1.githubusercontent.com/u/3248238?v=3&s=32 "ponyorm") 111 | [pony](https://github.com/ponyorm/pony) - Pony Object Relational Mapper. 112 | * ![alt text](https://avatars0.githubusercontent.com/u/119974?v=3&s=32 "Charles Leifer") 113 | [peewee](https://github.com/coleifer/peewee) - a small, expressive orm -- supports postgresql, mysql and sqlite. 114 | * ![alt text](https://avatars1.githubusercontent.com/u/7572385?v=3&s=32 "GenePeeks, Inc.") 115 | [py-rest-orm](https://github.com/GenePeeks/py-rest-orm) - Generic Python REST ORM. Inspired by Django. Powered by Requests. 116 | * ![alt text](https://avatars2.githubusercontent.com/u/2125212?v=3&s=32 "Mohamed Daif") 117 | [python-rest-model](https://github.com/mdaif/python-rest-model) - A standard way to consume a RESTful service, inspired by Django models. 118 | * ![alt text](https://avatars0.githubusercontent.com/u/126780?v=3&s=32 "Burak Yiğit Kaya") 119 | [pyresto](https://github.com/BYK/pyresto) - A generic ORM framework for RESTful APIs. 120 | * ![alt text](https://avatars3.githubusercontent.com/u/45120?v=3&s=32 "mongodb") 121 | [pymodm](https://github.com/mongodb/pymodm) - A Pythonic, object-oriented interface for working with MongoDB. 122 | * ![alt text](https://avatars2.githubusercontent.com/u/236514?v=3&s=32 "Jharrod LaFon") 123 | [PynamoDB](https://github.com/jlafon/PynamoDB) - A pythonic interface to Amazon's DynamoDB. 124 | * ![alt text](https://avatars3.githubusercontent.com/u/391998?v=3&s=32 "sebastien requiem") 125 | [redisco](https://github.com/kiddouk/redisco) - A Python Library for Simple Models and Containers Persisted in Redis. 126 | * ![alt text](https://avatars2.githubusercontent.com/u/319844?v=3&s=32 "Andrei Horak") 127 | [remodel](https://github.com/linkyndy/remodel) - Very simple yet powerful and extensible Object Document Mapper for RethinkDB, written in Python. 128 | * ![alt text](https://avatars1.githubusercontent.com/u/96970?v=3&s=32 "Joeri Bekker") 129 | [restorm](https://github.com/joeribekker/restorm) - RestORM allows you to interact with resources as if they were objects. 130 | * :ghost: [storm](https://storm.canonical.com) - Storm is an object-relational mapper (ORM) for Python developed at Canonical. 131 | * :ghost: [sqlobject](http://www.sqlobject.org) - SQLObject is a popular Object Relational Manager for providing an object interface to your database, with tables as classes, rows as instances, and columns as attributes. 132 | * ![alt text](https://avatars2.githubusercontent.com/u/4458558?v=3&s=32 "SurveyMonkey") 133 | [wukong](https://github.com/SurveyMonkey/wukong) - An ORM Client library for SolrCloud. 134 | * ![alt text](https://avatars0.githubusercontent.com/u/443794?v=3&s=32 "Alexander Zelenyak") 135 | [yadm](https://github.com/zzzsochi/yadm) - Yet Another Document Mapper (ODM) for MongoDB. 136 | * ![alt text](https://avatars2.githubusercontent.com/u/119974?v=3&s=32 "Charles Leifer") 137 | [walrus](https://github.com/coleifer/walrus) - Lightweight Python utilities for working with Redis. 138 | 139 | 140 | ## Data validation 141 | *Libraries for validating custom data structures.* 142 | * ![alt text](https://avatars1.githubusercontent.com/u/26229868?v=3&s=32 "eve") 143 | [cerberus](https://github.com/pyeve/cerberus) - Lightweight, extensible data validation library for Python. 144 | * ![alt text](https://avatars0.githubusercontent.com/u/1328688?v=3&s=32 "Michael Selik") 145 | [destructure](https://github.com/selik/destructure) - Easy declarative schema validation with optional name-binding. 146 | * ![alt text](https://avatars1.githubusercontent.com/u/329822?v=3&s=32 "Julian Berman") 147 | [jsonschema](https://github.com/Julian/jsonschema) - jsonschema is an implementation of JSON Schema for Python (supporting 2.7+ including Python 3). 148 | * ![alt text](https://avatars0.githubusercontent.com/u/22664290?v=3&s=32 "Shivaprasad Bhat") 149 | [pyschemes](https://github.com/shivylp/pyschemes) - PySchemes is a library for validating data structures in Python. 150 | * ![alt text](https://avatars0.githubusercontent.com/u/872991?v=3&s=32 "Davide Zanotti") 151 | [pyvaru](https://github.com/daveoncode/pyvaru) - Rule based data validation library for python 3. 152 | * ![alt text](https://avatars0.githubusercontent.com/u/1761188?v=3&s=32 "Shezad Khan") 153 | [required](https://github.com/shezadkhan137/required) - Required is a simple library which allows you to validate dependencies across multiple fields. 154 | * ![alt text](https://avatars1.githubusercontent.com/u/619158?v=3&s=32 "Vladimir Keleshev") 155 | [schema](https://github.com/keleshev/schema) - schema is a library for validating Python data structures, such as those obtained from config-files, forms, external services or command-line parsing, converted from JSON/YAML (or something else) to Python data-types. 156 | * ![alt text](https://avatars0.githubusercontent.com/u/6067509?v=3&s=32 "Colm O'Connor") 157 | [strictyaml](https://github.com/crdoconnor/strictyaml) - Type-safe YAML parser and validator. 158 | * ![alt text](https://avatars0.githubusercontent.com/u/446761?v=3&s=32 "Podio") 159 | [valideer](https://github.com/podio/valideer) - Lightweight data validation and adaptation Python library. 160 | * ![alt text](https://avatars0.githubusercontent.com/u/6367792?v=3&s=32 "guyskk") 161 | [validr](https://github.com/guyskk/validr) - A simple, fast, extensible python library for data validation. 162 | * ![alt text](https://avatars0.githubusercontent.com/u/41767?v=3&s=32 "Alec Thomas") 163 | [voluptuous](https://github.com/alecthomas/voluptuous) - Voluptuous, despite the name, is a Python data validation library. It is primarily intended for validating data coming into Python as JSON, YAML, etc. 164 | 165 | 166 | # Other resources 167 | * [fullstackpython: Object-relational mappers (ORMs)](https://www.fullstackpython.com/object-relational-mappers-orms.html) 168 | * [Python ORM/ODM Examples, For The Sleepy](https://github.com/sloria/PythonORMSleepy) 169 | * [martinfowler: Active Record](https://www.martinfowler.com/eaaCatalog/activeRecord.html) 170 | * [martinfowler: Data Mapper](https://martinfowler.com/eaaCatalog/dataMapper.html) 171 | * [wiki: Object-relational mapping](https://en.wikipedia.org/wiki/Object-relational_mapping) 172 | * [Higher Level Database Programming](https://wiki.python.org/moin/HigherLevelDatabaseProgramming) 173 | 174 | 175 | # Other Awesome Lists 176 | List of lists. 177 | * Monty 178 | * [awesome](https://github.com/sindresorhus/awesome) 179 | * [lists](https://github.com/jnv/lists) 180 | * Python 181 | * [awesome-python](https://github.com/vinta/awesome-python) 182 | * [awesome-sqlalchemy](https://github.com/dahlia/awesome-sqlalchemy) 183 | * [pycrumbs](https://github.com/kirang89/pycrumbs) 184 | * [python-github-projects](https://github.com/checkcheckzz/python-github-projects) 185 | * [python_reference](https://github.com/rasbt/python_reference) 186 | * [pythonidae](https://github.com/svaksha/pythonidae) 187 | 188 | # Contributing 189 | If you know some project/library that is not listed here, just let me know! Or even better, create a pull request. 190 | --------------------------------------------------------------------------------