{"id":25073704,"url":"https://github.com/bixoto/api-session","last_synced_at":"2025-04-14T23:15:04.794Z","repository":{"id":57410896,"uuid":"415877958","full_name":"Bixoto/api-session","owner":"Bixoto","description":"requests.Session to work with JSON APIs","archived":false,"fork":false,"pushed_at":"2025-04-14T12:15:53.000Z","size":226,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T23:14:52.037Z","etag":null,"topics":["json-api-client","python3","requests-python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/api-session/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bixoto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-11T10:27:48.000Z","updated_at":"2025-04-14T12:15:57.000Z","dependencies_parsed_at":"2024-07-08T10:45:11.579Z","dependency_job_id":null,"html_url":"https://github.com/Bixoto/api-session","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":"0.022727272727272707","last_synced_commit":"a212fba2a62c49e8086dda1a95868d0365fd9c1b"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bixoto%2Fapi-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bixoto%2Fapi-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bixoto%2Fapi-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bixoto%2Fapi-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bixoto","download_url":"https://codeload.github.com/Bixoto/api-session/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975329,"owners_count":21192210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json-api-client","python3","requests-python"],"created_at":"2025-02-06T23:29:30.720Z","updated_at":"2025-04-14T23:15:04.761Z","avatar_url":"https://github.com/Bixoto.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# api-session\n\n**api-session** is a small module providing an extended `requests.Session` class to work with JSON APIs.\n\nWe use it at [Bixoto](https://bixoto.com/) as a basis for JSON API clients such as [PyMagento][] or\n[PyBigBuy][].\n\nIt aims at factoring the common parts of these clients while staying very lightweight (\u003c100 SLOC).\n\n[PyMagento]: https://github.com/Bixoto/PyMagento\n[PyBigBuy]: https://github.com/Bixoto/PyBigBuy\n\n## Features\n\n* base URL: the base API URL is given only once on object creation; subsequent calls use `.get(\"/path\")`\n* read-only flag: if given, prevents the API from doing `POST` and similar calls\n* offline flag: if given, prevents the API from doing any call. This is useful for tests.\n* `requests.Session` inheritance: the class inherits from `requests.Session`, so it stays 100% compatible with it\n* (since 1.4) Response bodies are included in exception messages for 4xx errors. This behavior can be customized.\n\n## Install\n\n    pip install api-session\n\nOr with Poetry:\n\n    poetry add api-session\n\nDependency: Python 3.8+.\n\n## Usage\n\n```python3\nfrom api_session import APISession\n\nclient = APISession(\"https://httpbin.org\")\n\nclient.get_json_api(\"/get\")\n# =\u003e {...}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbixoto%2Fapi-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbixoto%2Fapi-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbixoto%2Fapi-session/lists"}