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

All Samples(13)  |  Call(6)  |  Derive(0)  |  Import(7)
<comment-ja>
?????????????
</comment-ja>
<comment-en>
TODO: English Comment
</comment-en>

src/k/a/karesansui-HEAD/karesansui/db/access/__init__.py   karesansui(Download)
if __name__ == '__main__':
    import sqlalchemy.orm
    from karesansui.db.model.user import User, get_user_table
 
    @dbsave
    # --
    # insert
    u = User('hoge@example.com', u'pass', u'salt', u'karesansui', u'ja-JP')  
    try:
        ret = save(session, u)

src/k/a/karesansui-HEAD/karesansui/db/access/user.py   karesansui(Download)
 
from karesansui.lib.crypt import sha1compare
from karesansui.db.model.user import User
from karesansui.db.access import dbsave, dbupdate, dbdelete
from karesansui.db.access.search import findbyand as _findbyand
def new(email, password, salt, nickname, languages=None):
    return User(email, password, salt, nickname, languages)
 
# -- process method
def login(session, email, password):
if __name__ == '__main__':
    import sqlalchemy.orm
    from karesansui.db.model.user import User, get_user_table
    bind_name = 'sqlite:///:memory:'
    engine = sqlalchemy.create_engine(bind_name, encoding="utf8", echo=True)
    """
    # process method
    u = User('pass', 'hoge@example.com', 'karesansui', 'ja-JP')
    if save(session, u):
        u = login(session, 'karesansui', 'pass')

src/k/a/karesansui-HEAD/karesansui/lib/merge.py   karesansui(Download)
from karesansui.lib.const import MACHINE_ATTRIBUTE, MACHINE_HYPERVISOR
from karesansui.db.model.machine import Machine
from karesansui.db.model.user import User
from karesansui.db.model.notebook import Notebook
from karesansui.lib.utils import uri_split, uri_join
            if model.attribute == 2:
                #import pdb; pdb.set_trace()
                user  = User(u"unknown",
                             unicode("dummydummy"),
                             unicode("dummydummy"),

src/k/a/karesansui-HEAD/karesansui/gadget/init.py   karesansui(Download)
from karesansui.lib.const import MACHINE_ATTRIBUTE, MACHINE_HYPERVISOR
from karesansui.db import get_engine, get_metadata, get_session
from karesansui.db.model.user import User
from karesansui.db.model.notebook import Notebook
from karesansui.db.model.tag import Tag
        (password, salt) = sha1encrypt(self.input.password)
 
        user  = User(u"%s" % self.input.email,
                              unicode(password),
                              unicode(salt),

src/k/a/karesansui-HEAD/tools/initialize_database.py   karesansui(Download)
    from karesansui.lib.const import MACHINE_ATTRIBUTE, MACHINE_HYPERVISOR
    from karesansui.db import get_engine, get_metadata, get_session
    from karesansui.db.model.user import User
    from karesansui.db.model.notebook import Notebook
    from karesansui.db.model.tag import Tag
    if user is None:
        # User Table set.
        new_user  = User(u"%s" % email,
                              unicode(password),
                              unicode(salt),

src/k/a/karesansui-HEAD/karesansui/lib/utils.py   karesansui(Download)
def karesansui_database_exists():
    from karesansui.db import get_session
    from karesansui.db.model.user import User
    session = get_session()
    try: