{"id":22377,"library":"slumber","title":"Slumber","description":"A library that makes consuming a REST API easier and more convenient. Current version is 0.7.1, with no recent releases (last release 2014-07-14). Considered in maintenance mode.","status":"maintenance","version":"0.7.1","language":"python","source_language":"en","source_url":"http://github.com/samgiles/slumber","tags":["rest","api","client","http"],"install":[{"cmd":"pip install slumber","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"HTTP client used by slumber","package":"requests","optional":false}],"imports":[{"note":"","wrong":"","symbol":"Slumber API base class","correct":"from slumber import API"},{"note":"","wrong":"","symbol":"Resource object","correct":"from slumber import Resource"}],"quickstart":{"code":"from slumber import API\n\n# Replace with your API URL\napi = API('https://api.example.com', auth=('username', 'password'))\n# If no authentication:\n# api = API('https://api.example.com')\n\nusers = api.users.get()\nprint(users)\n# For a specific resource:\n# user = api.users(1).get()","lang":"python","description":"Create an API instance and access resources via attribute chaining."},"warnings":[{"fix":"Always call resource methods with parentheses: `api.users.get()` not `api.users.get`.","message":"Slumber 0.7.x changed resource creation: previously you could call `api.users.get()` directly, but now you must use `api.users.get()` (with parentheses) to trigger a GET request. Older versions allowed `api.users.get` without parentheses.","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"Use `session = requests.Session(); session.auth = (user, pass); api = API(url, session=session)`.","message":"Authentication via `slumber.API(url, auth=(user, pass))` works but is considered deprecated in favor of passing a `requests.Session` with auth configured.","severity":"deprecated","affected_versions":">=0.7.0"},{"fix":"Use a different library for async workflows.","message":"Slumber does not support async/await. It is synchronous only. If you need async, consider using `httpx` or `aiohttp` based clients.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure your API URLs do not have trailing slashes, or handle redirects explicitly.","message":"Resource paths with trailing slashes may cause unexpected 301 redirects. Slumber does not normalize trailing slashes automatically.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'-07':25 '-14':26 '0.7.1':17 '2014':24 'api':9,32 'client':33 'consid':27 'consum':6 'conveni':13 'current':14 'easier':10 'http':34 'last':22 'librari':3 'mainten':29 'make':5 'mode':30 'recent':20 'releas':21,23 'rest':8,31 'slumber':1 'version':15","created_at":"2026-04-27T17:04:51.752020+00:00","updated_at":"2026-04-27T17:04:51.752020+00:00","problems":[{"fix":"Check the API URL and endpoint. Use `api.users.get()` with parentheses.","cause":"Resource not found or URL incorrect, resulting in None response.","error":"AttributeError: 'NoneType' object has no attribute 'get'"},{"fix":"Use `api.users.get()` instead of `api.users()`.","cause":"Trying to call a resource object directly instead of using `.get()`, `.post()`, etc.","error":"TypeError: 'Resource' object is not callable"},{"fix":"Run `pip install slumber` and ensure you are using the correct Python environment.","cause":"Slumber is not installed or installed in a different environment.","error":"ImportError: No module named slumber"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.7.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"http://github.com/samgiles/slumber","docs":null,"changelog":null,"pypi":"https://pypi.org/project/slumber/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-29","install_tag":null}}