← 输入框|github.com|刷新
Skip to content

About

Oxia Python Client SDK

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Oxia Python Client SDK

CI License FOSSA Status

Python client for Oxia, a scalable metadata store and coordination system for large-scale distributed systems.

Getting Started | Documentation | Discussion

Requirements

  • Python 3.10+
  • Linux, glibc or musl (x86_64, aarch64), or macOS (x86_64, aarch64), for which wheels are published. On any other platform, pip builds from the source distribution, which needs a Rust toolchain.

Installation

pip install oxia

Quick start

import oxia

with oxia.Client('localhost:6648') as client:
    # Put a value
    key, version = client.put('/my-key', b'my-value')

    # Get it back
    key, value, version = client.get('/my-key')

    # Conditional put (only if version matches)
    key, version = client.put('/my-key', b'new-value',
                              expected_version_id=version.version_id())

    # List keys in a range
    keys = client.list('/my-', '/my-~')

    # Delete
    client.delete('/my-key')

Features

  • CRUD operations: put, get, delete, delete_range
  • Range queries: list (keys only), range_scan (keys + values)
  • Conditional writes: version-based optimistic concurrency via expected_version_id
  • Ephemeral records: session-scoped keys that are removed when the client disconnects
  • Notifications: subscribe to real-time change events
  • Sequential keys: server-assigned monotonic key suffixes
  • Secondary indexes: additional lookup keys on records
  • Partition routing: co-locate related records on the same shard via partition_key
  • Floor/Ceiling/Lower/Higher lookups: nearest-key queries

For the full API reference, see the documentation.

How it works

This SDK is a binding over the Oxia Rust client, through PyO3: the wheel carries that client compiled in, and the Python package is the API over it, so the protocol itself lives in one place across the SDKs. The client runs on a thread of its own; operations from several Python threads run concurrently and batch together, and calls release the GIL while they wait.

Contributing

Please star the project if you like it!

Feel free to open an issue or start a discussion. See CONTRIBUTING.md for development setup and guidelines.

License

Copyright 2025 The Oxia Authors

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

FOSSA Status

About

Oxia Python Client SDK

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages