Skip to main content

py-xline is an official xline client sdk, written in Python.

Project description

py-xline

Apache 2.0 licensed codecov

py-xline is an official xline client sdk, written in Python.

Features

py-xline runs the CURP protocol on the client side for maximal performance.

Supported APIs

  • KV
    • Put
    • Range
    • Delete
    • Txn
    • Compact
  • Auth
    • AuthEnable
    • AuthDisable
    • AuthStatus
    • Authenticate
    • UserAdd
    • UserAddWithOptions
    • UserGet
    • UserList
    • UserDelete
    • UserChangePassword
    • UserGrantRole
    • UserRevokeRole
    • RoleAdd
    • RoleGet
    • RoleList
    • RoleGrantPermission
    • RoleRevokePermission
  • Lease
    • Grant
    • Revoke
    • KeepAlive
    • KeepAliveOnce
    • TimeToLive
    • Leases
  • Watch
    • Watch
  • Lock
    • Lock
    • Unlock
  • Cluster
    • MemberAdd
    • MemberAddAsLearner
    • MemberRemove
    • MemberUpdate
    • MemberList
    • MemberPromote
  • Maintenance
    • Alarm
    • Status
    • Defragment
    • Hash
    • Snapshot
    • MoveLeader

Installation

pip install py-xline

Quickstart

from py_xline import client

async def main():
  curp_members = ["172.20.0.3:2379", "172.20.0.4:2379", "172.20.0.5:2379"]
  cli = await client.Client.connect(curp_members)
  kv_client = cli.kv_client

  await kv_client.put(b"key", b"value")

  res = await kv_client.range(b"key")

  kv = res.kvs[0]
  print(kv.key.decode(), kv.value.decode())

Compatibility

We aim to maintain compatibility with each corresponding Xline version, and update this library with each new Xline release.

py-xline Xline
v0.1.0 v0.6.1

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

py_xline-0.1.0.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

py_xline-0.1.0-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file py_xline-0.1.0.tar.gz.

File metadata

  • Download URL: py_xline-0.1.0.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for py_xline-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a5ebee33c5ed50e410643c8528f3daa13bb40ad601ab20e7a98db278be83507c
MD5 ffa1fc9577488dde64fe9e52bcd74f21
BLAKE2b-256 c9262c98d8c990a3aa1f80d7d59d91e859aa9ad336752102ac65774d3738db57

See more details on using hashes here.

File details

Details for the file py_xline-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: py_xline-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for py_xline-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cd76fc4af73e17cb08b5cb05eed03af35dc6a185fd35b1d4d3ee4fbf11bc970
MD5 1c0e8723487d35137a00032a867d900c
BLAKE2b-256 11377559ea5fe2ae7a17304170f619662ab646fe745f1a80cbce087295fdb50c

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