Skip to main content

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

Project details


Release history Release notifications

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 the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
sqlbean-0.603.tar.gz (18.6 kB) Copy SHA256 hash SHA256 Source None Feb 11, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page