View
175
Download
1
Embed Size (px)
DESCRIPTION
Architect - a set of tools which enhances ORMs written in Python with more features and simplifies different database related complex tasks.
Citation preview
europython 2014
1 / 11
Architect – Object Relational Mapper’sbest friend
Max Tepkeev21 July 2014Berlin, Germany
europython 2014
2 / 11
The Story
europython 2014
3 / 11
Applause
europython 2014
4 / 11
Features
• Python 2.6 - 3.4• No external dependencies• Documentation at Read the Docs• 92% test coverage• Supported databases• PostgreSQL• MySQL
europython 2014
5 / 11
Supported ORMs
• Django• Peewee• Pony• SQLAlchemy
• SQLObject (soon)
europython 2014
6 / 11
Installation
From PyPi:
$ pip install architect
or clone from github:
$ git clone git://github.com/maxtepkeev/architect.git
europython 2014
7 / 11
Configuration
In the file where model is defined
from architect.orms.django.mixins import PartitionableMixin
Add mixin to the model
class YourModelName(PartitionableMixin, models.Model):
europython 2014
8 / 11
Configuration
Add PartitionableMeta with a few settingsclass YourModelName(PartitionableMixin, models.Model): class PartitionableMeta: partition_type = 'range' partition_subtype = 'date' partition_range = 'month' partition_column = 'added_at'
Initialization command$ architect partition –m path.to.the.model.module
europython 2014
9 / 11
Plans
• more partitioning methods• more orms• more databases
europython 2014
10 / 11
Contacts
https://github.com/maxtepkeev/achitect
email: [email protected]: max.tepkeev
europython 2014
11 / 11
Thank You