Repository navigation
v0.1.0
Async Wrapper for TinyDB
Introduces AIOBridge, an async-safe proxy for TinyDB operations. It leverages asyncio.to_thread to offload synchronous calls and uses a per-path asyncio.Lock to ensure safe concurrency. All core database and table-level operations are exposed via async def methods, each returning Result-wrapped responses for safe, exception-free handling.
Examples
Demonstrates customization of the bridge using:
- A custom TinyDB class with
MemoryStorage - An extended method (
getmany) for multi-record fetches
Usage is shown in a real-world pattern with async with context management and structured return handling.
Test Suite
Includes:
- Parametrized test coverage across all key bridge methods
run_concurrentlyhelper for stress-testing async behavior and verifying concurrency safety- Fixtures for injecting pre-populated databases to simulate realistic testing scenarios