Skip to main content

Asyncio Client for Apache Kudu Database Engine (Storage System).

Project description

akudu

Async Kudu Client. Graceful way for Python to async connect to Kudu database (data storage engine).

Quick start

It is recommanded to use Python == 3.10, others are not tested.

*protobuf>=3.20.0* is required, or you need to compile the protobuf files by yourself.
  1. Install akudu from PyPI.

    pip install akudu
    
  2. Test your Kudu server, such as 192.168.0.111:7051 with code here:

    import asyncio
    import akudu
    cli = akudu.Client('192.168.0.111', 7051)
    
    async def op():
        tables = await cli.list_tables()
        print(tables)
    
    asyncio.run(op())
    
  3. Here are some frequently used calls, for more please refer to the documentation.

    cli.ping()
    cli.list_tables()
    cli.insert()
    cli.scan()
    

Caution

  • This client is not thread-safety, it is recommended that one instance of Kudu() for each threads.

More

TODO

  • connect timeout, read timeout, write timeout
  • Steady state ping-pong
  • call-id used-up
  • test all calls
  • benchmark test
  • support RPC Sidecars
  • support TLS
  • fully support SASL

Base on

Run test

python -m venv env
source env/bin/activate
pip install protobuf
python -m test.test_tcp

Generate protobuf files

# kudu-master download from github.com kudu

# Because kudu proto generate .pb2 files in the name space: kudu, we need to change it into akudu.kudu
find kudu-master/src/ -name "*.proto" | xargs sed -i 's/import "kudu/import "akudu\/kudu/g'
mkdir kudu-master/src/akudu
mv kudu-master/src/kudu kudu-master/src/akudu

# Generate
find kudu-master/src/ -name "*.proto" | xargs protoc -I=kudu-master/src --python_out=.
# or
find kudu-master/src/ -name "*.proto" | xargs python -m grpc_tools.protoc -I=kudu-master/src --python_out=.

Ref

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

akudu-0.0.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

akudu-0.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file akudu-0.0.1.tar.gz.

File metadata

  • Download URL: akudu-0.0.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for akudu-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4cff0ee341a89abfc8686d4e3ab572f70983b08a398fb56d26dc880621848bf7
MD5 9561d6ac9734186338a25c666dd3cf5a
BLAKE2b-256 cc38eb8219355c390d1102393b8c19082acdbb014a431bf08158ba8a0f18d7e9

See more details on using hashes here.

File details

Details for the file akudu-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: akudu-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for akudu-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d21bf33dc39c4c8df407ca045bc2be13232e75c4170dd5992283bf6190149378
MD5 06c27135819459b079995a721455c0e0
BLAKE2b-256 345ccc284c15a2aa36be1fc876804cf65aba55bbe54af3e987cdc8bba6aa679e

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