Skip to main content
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 :)

Metadata

Release files for sqlbean 0.603

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlbean 0.603
File Size Uploaded Provenance
sqlbean-0.603.tar.gz 18.6 kB Without provenance Details

Release files / sqlbean-0.603.tar.gz

Download URL sqlbean-0.603.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
eb5137f84508ba50c4e1df2176781d35a2dc4bf15b09181ba5059b781032d8ce
BLAKE2b-256 checksum
How to use checksums
1454162f7bdecd7bb18d3329c9cd7eb4ea26a50906c48318b20b564bbdfdbae9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for sqlbean 0.603

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.603 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page