Skip to content

Add async Python API (AsyncContext)#61

Merged
beinan merged 3 commits into
lance-format:mainfrom
beinan:feat/async-api
Jun 9, 2026
Merged

Add async Python API (AsyncContext)#61
beinan merged 3 commits into
lance-format:mainfrom
beinan:feat/async-api

Conversation

@beinan

@beinan beinan commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds AsyncContext class wrapping sync Context via asyncio.run_in_executor(), matching lance's concurrency pattern
  • Zero Rust changes — the GIL is already released by py.allow_threads(), so executor threads aren't blocked
  • Adds pytest-asyncio to test dependencies
  • 10 async tests covering create, add, list, search, compact, checkout, fork, snapshot, repr, and kwargs forwarding

Closes #44

Test plan

  • All 10 async tests pass locally
  • Existing sync tests unaffected (no regressions)
  • CI passes

🤖 Generated with Claude Code

Adds AsyncContext class wrapping the sync Context via
asyncio.run_in_executor, matching lance's concurrency pattern.
Zero Rust changes — the GIL is already released by py.allow_threads().

Closes lance-format#44

Co-Authored-By: Beinan Wang <beinanwang@microsoft.com>
@beinan beinan marked this pull request as ready for review June 9, 2026 18:55
Beinan Wang added 2 commits June 9, 2026 11:55
Co-Authored-By: Beinan Wang <beinanwang@microsoft.com>
Co-Authored-By: Beinan Wang <beinanwang@microsoft.com>
@beinan beinan merged commit 8992f8e into lance-format:main Jun 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python api should support async

2 participants