Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(2)  |  Derive(2)  |  Import(4)

src/w/i/wimms-0.3/wimms/shardedsql.py   wimms(Download)
from sqlalchemy.sql import select
 
from wimms.sql import SQLMetadata
 
ENGINE_INDEX = 0
class ShardedSQLMetadata(SQLMetadata):
 
    def __init__(self, databases, create_tables=False, pool_size=100,
                 pool_recycle=60, pool_timeout=30, max_overflow=10,
                 pool_reset_on_return='rollback', **kw):

src/s/t/stokenserver-HEAD/stokenserver/metadata.py   stokenserver(Download)
from zope.interface import Interface, implements
 
from wimms.sql import SQLMetadata
from wimms.shardedsql import ShardedSQLMetadata
 
class MetadataDB(SQLMetadata):
    implements(IMetadataDB)
 
 
class ShardedMetadataDB(ShardedSQLMetadata):

src/t/o/tokenserver-HEAD/loadtest/populate-db.py   tokenserver(Download)
#! /usr/bin/env python
# script to populate the database with records
import time
import random
from wimms.sql import SQLMetadata, _CREATE_USER_RECORD
    }
    # for each user in the range, assign him to a node
    md = SQLMetadata(sqluri, create_tables=True)
    for idx in range(0, user_range):
        email = "%s@%s" % (idx, host)

src/w/i/wimms-0.3/wimms/tests/test_sql.py   wimms(Download)
from unittest2 import TestCase
import os
from wimms.sql import SQLMetadata
 
 
    def setUp(self):
        super(TestSQLDB, self).setUp()
 
        self.backend = SQLMetadata(self._SQLURI, create_tables=True)