Skip to main content

Python DB API 2.0 (PEP 249) driver for Tsurugi

Project description

Tsurugi Python DB-API

Tsurugi Python DB-API (tsurugi-dbapi) is a Python DB API 2.0 driver for accessing Tsurugi.

Target

  • Tsurugi 1.10.0 or later
  • Python 3.10 or later
  • Python DB API 2.0 (PEP 249)

Limitation

  • Only TCP connection is available.
  • The default transaction_type is OCC.
  • The default commit_type is DEFAULT.
  • The default shutdown_type is GRACEFUL.
  • BLOB/CLOB is not supported.

Installation

uv add tsurugi-dbapi

Example

import tsurugi_dbapi as tsurugi

def example():
    with tsurugi.connect(
        endpoint="tcp://localhost:12345",
        user="tsurugi",
        password="password",
        default_timeout=30,  # seconds
    ) as connection:
        with connection.cursor() as cursor:
            cursor.execute("insert into example values (1, 100, 'abc')")
            print("insert rowcount:", cursor.rowcount)
            connection.commit()

            cursor.execute("select * from example")
            for row in cursor:
                print("row:", row)
            connection.commit()

See examples for more examples.

License

Apache License, Version 2.0

Project details


Download files

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

Source Distribution

tsurugi_dbapi-0.9.0.tar.gz (219.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tsurugi_dbapi-0.9.0-cp310-abi3-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

tsurugi_dbapi-0.9.0-cp310-abi3-musllinux_1_2_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

tsurugi_dbapi-0.9.0-cp310-abi3-manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

tsurugi_dbapi-0.9.0-cp310-abi3-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file tsurugi_dbapi-0.9.0.tar.gz.

File metadata

  • Download URL: tsurugi_dbapi-0.9.0.tar.gz
  • Upload date:
  • Size: 219.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tsurugi_dbapi-0.9.0.tar.gz
Algorithm Hash digest
SHA256 f4bc8c4c3953fbbaf2cbfdda0d06930f832162ed95a1fdf55b68c7b227db9f95
MD5 216428c35e05e145d44157dc81b74956
BLAKE2b-256 dd96367f9ac179575be6be992dffdf50bf48be245e2fa8884887666eecb3bb9b

See more details on using hashes here.

File details

Details for the file tsurugi_dbapi-0.9.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: tsurugi_dbapi-0.9.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tsurugi_dbapi-0.9.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f0606dc4b71f394a4a78d4dfd6a1031bce5f02ebdf125ff7d028dc129b33d642
MD5 a97848fdf8e0cefdb7adfd4598a375c8
BLAKE2b-256 1271d69965dd99812bf998864f72f5cdae1de31786d1c042ba6c7853762d6b68

See more details on using hashes here.

File details

Details for the file tsurugi_dbapi-0.9.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: tsurugi_dbapi-0.9.0-cp310-abi3-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tsurugi_dbapi-0.9.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c3ea336e09b699f0565e52f0a01aeeb1f7bd33b07da8aae2c4e7998f1063b312
MD5 b590dcab6cd161550bc887ef368dd329
BLAKE2b-256 ec71ebb7aa098eb7d2b1691d38bae74bea88cfea3d1e2eaaed20771c2970a674

See more details on using hashes here.

File details

Details for the file tsurugi_dbapi-0.9.0-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: tsurugi_dbapi-0.9.0-cp310-abi3-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tsurugi_dbapi-0.9.0-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dd6f030f66c89f3ca25dbfd441977948645329d41df60b910f3a809f4857d4f0
MD5 896d8129ca8af29ba41ca917c352627e
BLAKE2b-256 63ae12d254537faaf7e2ae7734d6102a908b043fafdd88c13961f489e2296a98

See more details on using hashes here.

File details

Details for the file tsurugi_dbapi-0.9.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: tsurugi_dbapi-0.9.0-cp310-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.10+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tsurugi_dbapi-0.9.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e3e1780c110dcec945390de2c677a1bf7fca744eb54fb0b81fb3a79640939a2
MD5 f2c743d4600bd2989af9e89f3dd467d0
BLAKE2b-256 1d4c6fbbb49191af523383193da29d2833fe3e30b765d34c4392cf9b9c5f7e49

See more details on using hashes here.

Supported by

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