skillfed

hammock

rest like a boss

hammock v0.2.4 169.3K downloads/30d#10,420 on PyPI464
License unclear UNKNOWN Abandoned released

What it is and what it does

Hammock is a thin wrapper around the requests library that lets you construct REST API URLs and make HTTP calls using Python object notation and method chaining instead of manual string formatting. Instead of building URLs like `requests.get("%s/repos/%s/%s/watchers" % (base, user, repo))`, you write `api.repos(user, repo).watchers.GET()`. It supports all HTTP verbs (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) and passes through any keyword arguments to the underlying requests methods, including auth, headers, and params.

The package was last updated in April 2013 and is no longer maintained. While it has no known security vulnerabilities, its age means it has not been tested against modern Python versions or recent versions of requests, and the codebase is frozen. For new projects, more actively maintained REST client libraries or modern async alternatives would be safer choices.

Use it for:

  • Simplify GitHub API interactions by chaining method calls instead of constructing URLs manually.
  • Build Twitter API clients where endpoint paths map naturally to object attributes and method calls.
  • Maintain session-based authentication across multiple REST requests to services like JIRA by configuring auth once.
  • Prototype REST API clients quickly without writing URL string formatting boilerplate.

Worth the install?

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

Hammock wraps the requests library to let you build REST API calls using object notation instead of string formatting, converting URL paths into chained method calls.

No. The package is abandoned (last update April 2013, no commits since), install friction is high, and license terms are unclear. While it has no known vulnerabilities and works for simple REST wrapping, modern alternatives are actively maintained and better suited to current Python ecosystems. Use only if you are maintaining legacy code that already depends on it.

Install

hammock on PyPI

pip

pip install hammock

uv

uv add hammock

poetry

poetry add hammock

Installing hammock

Before you install

High install friction due to no runtime dependencies but abandoned maintenance status—last release was in 2013, over a decade ago, with no commits since then. The package has not been updated to reflect modern Python versions or security practices.

License in practice

License treatment is unclear; the description excerpt contains MIT-like text but the metadata lists license_raw as 'UNKNOWN' with no SPDX identifier. Verify the actual license terms before relying on this package in a production or commercial context.

Quickstart

from hammock import Hammock

api = Hammock('https://api.example.com')
response = api.users('alice').posts.GET()
print(response.json)

Requires requests library (not listed as explicit dependency in metadata); Python version compatibility unspecified and untested on modern versions.

Verify before relying

  • Whether requests is truly a runtime dependency or only assumed; metadata lists zero runtime dependencies.
  • Actual license terms and compatibility with your project's license requirements given unclear license_raw.
  • Compatibility with Python versions beyond those in use when the package was last updated in 2013.
  • Whether the package still works with current versions of the requests library.

Package facts

License UNKNOWN (unclear)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 4,863 days since the last release
Last repo commit
First released
Downloads 169,349/month — #10,420 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: hammock-0.2.4.tar.gz

Tags

rest api client wrapperrequests library wrapperurl building for rest apisrest api url constructionobject notation rest callsrest client simplification
rest-clientabandoned

More WWW/HTTP packages