zach-overflow opened a new issue, #73661:
URL: https://github.com/apache/airflow/issues/73661

   ### Description
   
   Currently, the `apache-airflow-client` package (generated from the 
`openapi-generator-cli`) uses the default `urllib3` client, which does not 
support async operations.
   
   The proposed feature is to generate and package `async` client code in the 
`apache-airflow-client` package, in addition to the existing synchronous client 
code. 
   Ideally, this **should not** alter the synchronous interface to ensure this 
is not a breaking change.
   
   ### Use case/motivation
   
   Async client usage is particularly helpful for users who either:
   * Need to perform independent API operations in a single process (such as a 
bulk "pause dags" operation).
   * Manage multiple Airflow instances, and require multi-plexing requests 
across instances (e.g. a management script which updates the same Airflow 
variables across multiple Airflow instances at once).
       * This is a situation I'm currently using async api calls for, but with 
httpx2 directly, rather than with the official Apache Airflow python client. It 
would be really nice to have the additional type safety the official client 
offers, and I'm sure this would benefit others as well.
   
   As noted above, `urllib3` is the current client used in the client 
generation tool, but the upcoming release of `openapi-generator-cli` version 
`7.26.0` will support for generating code which uses `httpx2` under the hood. 
`httpx2` supports both sync and async operations. Additionally, the 
openapi-generator-cli has configuration options to generate code with both sync 
and async code in the same output package.
   
   Both the `httpx2` and `async` code generation config options are described 
here: https://openapi-generator.tech/docs/generators/python/#config-options
   
   ### Related issues
   
   Tangentially related: https://github.com/apache/airflow/issues/70522 
   * context:`httpx` is apparently no longer actively maintained, and 
Pydantic's `httpx2` is the replacement that appears to have taken the 
designation as the python community's "accepted" replacement.
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to