togethercomputer / together-python

The Official Python Client for Together's API
https://pypi.org/project/together/
Apache License 2.0
24 stars 5 forks source link

Replace requests/aiohttp with httpx #86

Open orangetin opened 5 months ago

orangetin commented 5 months ago

Is your feature request related to a problem? Please describe. httpx is a modern http client library that provides sync and async libraries.

Describe the solution you'd like

  1. Simplify the code used for sync/async by replacing requests/aiohttp with httpx
  2. Enable http2 by default and have a configurable option to disable it
  3. [Optional] Add support for proxies

Describe alternatives you've considered N/A

Additional context Relevant code that needs to be changed lives in this file.

Ousret commented 5 months ago

Hello there,

Would you consider Niquests as a potential replacement candidate ? It's a drop-in replacement for Requests with both sync and async interfaces along other features. Happy to help if needed.

Regards,