Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A auto maping ORM for MYSQL and can bind with memcached

Project Description
from sqlbean.db.sqlstore import SqlStore

#tables can in different databases

DATABASE_CONFIG = {
"mokodb": {
"master": "localhost:3306:mokodb:root:111111",
"tables": ["*", "user"],
},
}

SQLSTORE = SqlStore(db_config=DATABASE_CONFIG, **{})


def get_db_by_table(table_name):
return SQLSTORE.get_db_by_table(table_name)


from sqlbean.db import connection
connection.get_db_by_table = get_db_by_table

from sqlbean.shortcut import Model

# will auto mapping the table structure
# class User will mapping to user
# class UserProfile will mapping to user_profile and so on

class User(Model):
pass

for i in User.where():
print i.id


# more useage please the source code :)
Release History

Release History

This version
History Node

0.603

History Node

0.602

History Node

0.601

History Node

0.600

History Node

0.515

History Node

0.514

History Node

0.513

History Node

0.512

History Node

0.510

History Node

0.509

History Node

0.508

History Node

0.507

History Node

0.506

History Node

0.505

History Node

0.504

History Node

0.503

History Node

0.502

History Node

0.501

History Node

0.500

History Node

0.499

History Node

0.498

History Node

0.497

History Node

0.496

History Node

0.495

History Node

0.494

History Node

0.493

History Node

0.492

History Node

0.491

History Node

0.490

History Node

0.485

History Node

0.483

History Node

0.482

History Node

0.481

History Node

0.480

History Node

0.462

History Node

0.461

History Node

0.452

History Node

0.451

History Node

0.46

History Node

0.44

History Node

0.43

History Node

0.42

History Node

0.41

History Node

0.40

History Node

0.39

History Node

0.38

History Node

0.37

History Node

0.36

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
sqlbean-0.603.tar.gz (18.6 kB) Copy SHA256 Checksum SHA256 Source Feb 11, 2012

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