11
europython 2014 1 / 11 Architect – Object Relational Mapper’s best friend Max Tepkeev 21 July 2014 Berlin, Germany

EuroPython 2014 - Architect

  • 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

Page 1: EuroPython 2014 - Architect

europython 2014

1 / 11

Architect – Object Relational Mapper’sbest friend

Max Tepkeev21 July 2014Berlin, Germany

Page 2: EuroPython 2014 - Architect

europython 2014

2 / 11

The Story

Page 3: EuroPython 2014 - Architect

europython 2014

3 / 11

Applause

Page 4: EuroPython 2014 - Architect

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

Page 5: EuroPython 2014 - Architect

europython 2014

5 / 11

Supported ORMs

• Django• Peewee• Pony• SQLAlchemy

• SQLObject (soon)

Page 6: EuroPython 2014 - Architect

europython 2014

6 / 11

Installation

From PyPi:

$ pip install architect

or clone from github:

$ git clone git://github.com/maxtepkeev/architect.git

Page 7: EuroPython 2014 - Architect

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):

Page 8: EuroPython 2014 - Architect

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

Page 9: EuroPython 2014 - Architect

europython 2014

9 / 11

Plans

• more partitioning methods• more orms• more databases

Page 10: EuroPython 2014 - Architect

europython 2014

10 / 11

Contacts

https://github.com/maxtepkeev/achitect

email: [email protected]: max.tepkeev

Page 11: EuroPython 2014 - Architect

europython 2014

11 / 11

Thank You