testcontainers-python icon indicating copy to clipboard operation
testcontainers-python copied to clipboard

Feature: Async OpenFGA Client

Open MRocholl opened this issue 4 months ago • 0 comments

What are you trying to do?

Add get_async_client() method to OpenFGAContainer to support async OpenFGA clients.

Previous issue regarding OpenFGA with the initial contribution is: https://github.com/testcontainers/testcontainers-python/issues/806

Why should it be done this way?

Modern async web frameworks (FastAPI, async Django) use AsyncOpenFgaClient in production, but testcontainers only provides sync clients. This creates a production-test mismatch requiring ugly workarounds.

The OpenFGA SDK already provides both sync and async clients - testcontainers should support both.

Other references:

MRocholl avatar Aug 06 '25 11:08 MRocholl