{"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,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","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,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}