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.7-cp311-cp311-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.11 Windows x86-64

light_database-0.1.7-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.7-cp311-cp311-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

light_database-0.1.7-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.7-cp310-cp310-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.10 Windows x86-64

light_database-0.1.7-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.7-cp310-cp310-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

light_database-0.1.7-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.7-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for light_database-0.1.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 76f3bd56879f0ed1e69afc7b60dd7614df23aeedbff4850ac43479722cfb7bd8
MD5 27dfd3be8680cb2b1a2ac63660edde92
BLAKE2b-256 ab132311aacaf56ed1069a462b269462bc6e291174249bf881f0a003627fd99b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for light_database-0.1.7-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 031a8de0498d0059c9c1af4720ef12ce8d6d10c306c4f41b808bcb7ba76efdf4
MD5 9ebbcec4aa1c93ad66bb3ebd07e58603
BLAKE2b-256 2c772f2f16413b1ab941b4102c0ca16b37659eb2ffaf40abdb7e65106efa6b06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for light_database-0.1.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 06d870e23f0dbaf2bb933ef29fa8c6d23ae63fa8381ac215e530676120af24a4
MD5 87c8c27b74ad6b42e697848890d6bcd1
BLAKE2b-256 f043810becb1ebfb9022f4e92a5641541bcb3c0841387412df1d41100829a7a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for light_database-0.1.7-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9755a09321e12b5772607fd09a3744bc4ed8d33e9630410d37a9d3568e09fceb
MD5 cb572aa537fa66eb1dbb21bb5f8e12d6
BLAKE2b-256 ba34c35dbb5a28cb520321f69685e6bfba0b4669308eaca99d072a6087af19de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for light_database-0.1.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2ae3fd34d3beb15eef61279afa85f6ea95abc5344683a7236977c9f92c5b5448
MD5 1949ddb34429abf807ef350d48113278
BLAKE2b-256 11ab2376f5d74d242f8c0a759f702654b98d170056d8a7b89d0ebe06025643a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for light_database-0.1.7-cp310-cp310-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 52bd5ca64e4652cc51b858e2706fdb07f2ad3c5ea880cc7c56957f27fdf3e2d0
MD5 52846f2b36ef89bfcadfd6a0626e2d62
BLAKE2b-256 c3e9a8fb02528d7c6ba877706e79b3e5441ecd30c05ae3f9f975f921c7fdd4ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for light_database-0.1.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e146cb9b0389ad5b3933d91661a43f529cecef773b375d88498d420f672102fc
MD5 605462748353b20e80ff60732581d356
BLAKE2b-256 a4dc968e22a6762b8afde9c08e820dec28ed84efd41458333ed735ed12ade5a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for light_database-0.1.7-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8b4ac4e58aaa780f351c4e786e81121b9bd1a0c76214bfacd8986615d4cf46b2
MD5 59b1d4da6c31bf82e5b083484f224d78
BLAKE2b-256 74b61cc4db50b7a12bb351873d1e0dc76650d3bf3b406457e369b705dc877333

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