Skip to main content

Easy way to handle database

Project description

简介

light-database 是一个用于简化数据库交互的 Python 包。它支持多种数据库系统,并提供一个易于使用的接口来执行查询和管理数据库。

安装

通过 pip 安装:

pip install light-database

快速开始

  1. 使用 light-database 包初始化项目环境:
from light_database.config import EnvConfig

EnvConfig.write(section="mysql", host=host, port=port, database=database, user=user, password=password)
# EnvConfig.write(section="hive", host=host, port=port, user=user, password=password, auth_mechanism="PLAIN")
# EnvConfig.write(section="hbase", host=host, port=port)
  1. 使用 light-database 包执行查询:
from light_database.mysql.db import MysqlDB

df1 = MysqlDB.filter(table) \
            .select(column1, column2) \
            .where(column3__in=[1, 2], column4=1).df()

df2 = MysqlDB.filter(table) \
            .select(column1, column2) \
            .where(column3__lt=1, column4__ne=1).df[1:2]

功能

  • 支持多种数据库系统(如 MySQL、PostgreSQL、StarRocks、Hive、HBase)
  • 简洁的 API
  • 连接池管理
  • 自动转换查询结果

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

light_database-0.1.9-cp311-cp311-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.11 Windows x86-64

light_database-0.1.9-cp311-cp311-manylinux_2_17_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

light_database-0.1.9-cp311-cp311-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

light_database-0.1.9-cp311-cp311-macosx_10_9_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

light_database-0.1.9-cp310-cp310-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.10 Windows x86-64

light_database-0.1.9-cp310-cp310-manylinux_2_17_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

light_database-0.1.9-cp310-cp310-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

light_database-0.1.9-cp310-cp310-macosx_10_9_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

File details

Details for the file light_database-0.1.9-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for light_database-0.1.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f8847f03c65711cfc42a735ae19d871c49e5802aaa2f3a8a617e2de8276b5326
MD5 89d372da3c4b344965b158a02f1eec3e
BLAKE2b-256 77f04c1ec954b1386b4ff20678a4879a35f80c45012f05d28c2b2495e3986699

See more details on using hashes here.

File details

Details for the file light_database-0.1.9-cp311-cp311-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for light_database-0.1.9-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 51f352d4bf1ab5d8f59b0c6811e086960fc6844399826fc1b2a8815a0da7084a
MD5 89f83c27312e1721f0d1bfc5949854de
BLAKE2b-256 227236f2539e41a2ac40d0a16209df05c91d9cda66e22838af48416c8a462c55

See more details on using hashes here.

File details

Details for the file light_database-0.1.9-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for light_database-0.1.9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cbebebbeeb370871cb48bccdb65dd8c4b5eada1014756c2be75fc4aa5102dba4
MD5 0f5676481f4ecbb0d7dd5e09e63f4b5b
BLAKE2b-256 5fd9476f46cd9ed2efdf64100b8025a4e3868b6a6f9d6c13606fe93a9b35131a

See more details on using hashes here.

File details

Details for the file light_database-0.1.9-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for light_database-0.1.9-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1eb5a8f38f669fe9a3f0309e2da933bded6a8b717823b94fd23df71e5f43ab71
MD5 fbb17af5b50bdce63c17aab88d2649c1
BLAKE2b-256 bce3af48ced4cd0ae91d39215ec8e3a08f3a8751b765e4838089a420aceb3c5c

See more details on using hashes here.

File details

Details for the file light_database-0.1.9-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for light_database-0.1.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d7577f56f64cb2bfe053f9ffcab89f9feda0562851d4e8f05a2988f6d900f509
MD5 828fda8d1d717d798e2712bc1fbc766b
BLAKE2b-256 98256431fea8612b13634dc4749e274c57cb7bb2f7a73d3bc1eaff2092c45631

See more details on using hashes here.

File details

Details for the file light_database-0.1.9-cp310-cp310-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for light_database-0.1.9-cp310-cp310-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c1c0ffb8f3d4908260dd4282dad77d670623f98e3e7ea2421267cc0327fcda0e
MD5 48eb5632f5a5d4e4868a7f92f98188b8
BLAKE2b-256 e28055282423f2727789ebed3d5e33b3cda5e7ba68a20f136cadef187a46ef26

See more details on using hashes here.

File details

Details for the file light_database-0.1.9-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for light_database-0.1.9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4516d69760627a26f5b0321f4c49a33e77d950ffd5f31bfe38f19eead5a63835
MD5 abf0fcb58c6e633ea2bde93afe1f04ae
BLAKE2b-256 061f032ed88c88f76e7470b6caa733c4f439071ef05ad4e167ae74dbe3a20c67

See more details on using hashes here.

File details

Details for the file light_database-0.1.9-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for light_database-0.1.9-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 59332babcc5a45b2ab554fce5e151620b88b5d7226725c0f3f1f28289456d122
MD5 94c59a75ff283c7d9ec86cbdf0b9fd41
BLAKE2b-256 25834fded37697d34eb1834687cec75ad0cc408260c72b90f7159f31da1617e4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page