Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sqlbean

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sqlbean

A auto maping ORM for MYSQL and can bind with memcached

  • 0.603
  • PyPI
  • Socket score

Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc