A declarative HTTP client for Python that uses decorators and type hints to define API endpoints. Version 0.10.0, released in 2024, modernises to Pydantic v2 and requires Python 3.10+. Development is active but low velocity.
pip install uplinkVerified import paths — ran on the pinned version, not inferred.
Define a GitHub API client that fetches a user by username.
Upgrade pydantic to v2 and update your models accordingly, or pin uplink<0.10.0 if you must keep pydantic v1.
Upgrade to Python 3.10+ or use uplink==0.9.7 (last supporting Python 3.7+).
Install aiohttp (pip install uplink[aiohttp]) and configure the client with 'client=aiohttp.ClientSession()'.
Pass timeout via the Consumer's 'timeout' argument or the 'request_timeout' parameter in method calls.
Use: from uplink.retry import retry
Upgrade to uplink>=0.10.0 or revert to pydantic v1 with 'class Config'.
Ensure you instantiate the consumer correctly: github = GitHub()