skillfed

uplink

A Declarative HTTP Client for Python.

uplink v0.10.0 190.7K downloads/30d#9,901 on PyPI1,140
Permissive license MIT License Copyright (c) 2018 P. Raj Kumar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) AGING released

What it is and what it does

Uplink is a declarative HTTP client library that lets you define REST API clients as Python classes using decorators and type hints, inspired by Retrofit. Instead of writing ad-hoc requests calls, you annotate methods with @get, @post, etc., and specify path parameters, query strings, and request bodies through function arguments. It handles URL construction, parameter serialization, and response parsing automatically.

The library works with requests by default and supports async I/O through aiohttp and twisted. It can deserialize responses into custom Python objects, with optional integrations for marshmallow and pydantic schemas. You bring your own HTTP session for control over connection pooling, authentication, and other session-level concerns.

Use it for:

  • Building a reusable Python client for a third-party REST API without writing repetitive request boilerplate.
  • Creating internal API abstraction layers so application code calls clean Python methods instead of raw HTTP calls.
  • Implementing async API clients with aiohttp or twisted when you need non-blocking I/O.
  • Defining strongly-typed API contracts with decorators and type hints to catch errors early.
  • Integrating with marshmallow or pydantic to automatically serialize and deserialize JSON responses.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Uplink turns HTTP APIs into declarative Python classes using decorators and type hints, letting you build reusable API clients with minimal boilerplate.

Yes, with conditions. Uplink is a solid choice for building structured REST clients in modern Python and has no known vulnerabilities. The low install friction and permissive MIT license make it safe to adopt. However, the aging maintenance status means you should verify that async support and optional integrations match your needs before committing to it for a new project.

Install

uplink on PyPI

pip

pip install uplink

uv

uv add uplink

poetry

poetry add uplink

Installing uplink

Before you install

Low friction install with three lightweight runtime dependencies (requests, six, uritemplate). Maintenance status is aging—last release was 426 days ago—but the repository remains active with 1140 stars.

License in practice

MIT License permits unrestricted use, modification, and distribution with minimal obligations, making it safe for commercial and proprietary projects.

Quickstart

pip install uplink

from uplink import Consumer, get, Path, Query

class GitHub(Consumer):
    @get("users/{user}/repos")
    def get_repos(self, user: Path, sort_by: Query("sort")):
        pass

github = GitHub(base_url="https://api.github.com/")
repos = github.get_repos(user="octocat", sort_by="created")

Requires Python 3.10 or later.

Verify before relying

  • Whether aiohttp and twisted async support are production-ready given the aging maintenance status
  • Current state of optional marshmallow and pydantic integrations and their maintenance

Package facts

License MIT License Copyright (c) 2018 P. Raj Kumar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — requests, six, uritemplate
Maintenance aging — 426 days since the last release
Last repo commit
First released
Downloads 190,687/month — #9,901 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: uplink-0.10.0-py3-none-any.whl

Keywords: api, client, http, rest, retrofit

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries

Tags

declarative http clientapi client generatorretrofit-style pythonrest client decoratorstructured api wrapperhttp request abstractionasync api client
rest-clientdecorator-basedasync-ready

More Libraries packages