Skip to main content

vidbcontrol

一个可以进行数据验证的服务器配置信息库

安装

pip install vidbcontrol

使用

生成sql语句

    # 示例使用
    table = Query("name", "public")

    try:
        sql, params = table.select(**{
            "columns": ["name AS username", "age AS userage"],
            "where": {
                "and": {
                    "name=": ["zhoubin", "zhangsan"],  # 支持列表
                    "or": {
                        "age>": 20,
                        "age<": 10
                    },
                    "age BETWEEN": [18, 30]
                }
            },
            "orderby": "name",
            "limit": 1
        })
        print("SQL 语句:", sql)
        print("参数列表:", params)

        sql, params = table.insert({"name":  "test", "age": 20})
        print("SQL 语句:", sql)
        print("参数列表:", params)

        sql, params = table.insert_mul(**{
            "columns": ["name", "age"],
            "data": [
                ["zhoubin", 28],
                ["zhangsan", 30]
            ]
        })
        print("SQL 语句:", sql)
        print("参数列表:", params)

        sql, params = table.update({"name":  "test", "age": 20}, {"name=":  "test", "age=": 20})
        print("SQL 语句:", sql)
        print("参数列表:", params)

        sql, params = table.delete({"name=":  "test", "age=": 20})
        print("SQL 语句:", sql)
        print("参数列表:", params)
    except DBException as e:
        print(f"数据库异常: {e}")

依赖库

  • psycopg2

版权说明

该项目签署了MIT 授权许可。详细请查看LICENSE

Metadata

Release files for vidbcontrol 0.1.0

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

Source distribution (sdist)

Source distribution for vidbcontrol 0.1.0
File Size Uploaded Provenance Actions
vidbcontrol-0.1.0.tar.gz 6.1 kB Without provenance Details for vidbcontrol-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vidbcontrol 0.1.0
File Interpreter ABI Platform Actions
vidbcontrol-0.1.0-py3-none-any.whl Python 3 none any Details for vidbcontrol-0.1.0-py3-none-any.whl

Total release size: 12.9 kB

Release files / vidbcontrol-0.1.0.tar.gz

Download URL vidbcontrol-0.1.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
96acf0b640593448f161183d1df742b4d3bde041de25ef3415b64e87391d3850
BLAKE2b-256 checksum
How to use checksums
f04c949400e51be9458ab7ebc1d446d64f3260cec2f53ecccaf2bc2b709c4404
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Release files / vidbcontrol-0.1.0-py3-none-any.whl

Download URL vidbcontrol-0.1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c49f281411df9218cff794068cbe6b597d3dc6db4088a3e59d722026cce60c29
BLAKE2b-256 checksum
How to use checksums
1b0f7c80d541394f50ae4ad6223bcf7ae2bc76e244cde42d02bf869fa9deaaf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Security for vidbcontrol 0.1.0

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files 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