authentik icon indicating copy to clipboard operation
authentik copied to clipboard

Python client slow when importing

Open javikalsan opened this issue 2 years ago • 2 comments

Describe your question Is there a way to make imports using the Python client faster?

Relevant info Here is an example I did using Python 3.12.4 and Authentik client version 2024.6.3-1723032688 authentik_client installations did using a virtual environment and pip.

time python -c "from authentik_client.api_client import ApiClient"
real    0m11,639s
user    0m11,525s
sys     0m0,115s

and other downgrading to version 2024.2.2.post1710464650

time python -c "from authentik_client.api_client import ApiClient"

real    0m3,400s
user    0m3,344s
sys     0m0,057s

I read this related issue on openapi generator: https://github.com/OpenAPITools/openapi-generator/issues/18144

Thanks!

javikalsan avatar Aug 12 '24 08:08 javikalsan

has there been an update on this? i'm currently trying to use it in a cli tool and always waiting for the import to finish is a bit cumbersome >.>

katrinm86 avatar Mar 05 '25 16:03 katrinm86

Should be able to improve this with https://github.com/OpenAPITools/openapi-generator/pull/21486 since thats released in 7.15 which makes the import much faster

BeryJu avatar Aug 27 '25 14:08 BeryJu