{"id":18663557,"url":"https://github.com/sanjacob/tiny-api-client","last_synced_at":"2025-08-20T18:32:38.581Z","repository":{"id":208621244,"uuid":"721352010","full_name":"sanjacob/tiny-api-client","owner":"sanjacob","description":"The short and sweet way to create API clients in Python","archived":false,"fork":false,"pushed_at":"2024-10-08T09:08:45.000Z","size":144,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-15T02:29:54.022Z","etag":null,"topics":["api-client","decorators","python","requests"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/tiny-api-client/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanjacob.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"sanjacob"}},"created_at":"2023-11-20T22:06:34.000Z","updated_at":"2024-10-17T17:57:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c859b73-db36-41fb-9346-9bdd47c04dda","html_url":"https://github.com/sanjacob/tiny-api-client","commit_stats":null,"previous_names":["sanjacob/tiny-api-client"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjacob%2Ftiny-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjacob%2Ftiny-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjacob%2Ftiny-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjacob%2Ftiny-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanjacob","download_url":"https://codeload.github.com/sanjacob/tiny-api-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445926,"owners_count":18227060,"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":["api-client","decorators","python","requests"],"created_at":"2024-11-07T08:18:42.178Z","updated_at":"2024-12-19T14:07:10.673Z","avatar_url":"https://github.com/sanjacob.png","language":"Python","readme":"# Tiny API Client 🐝\n\n[![License: GPL  v2][license-shield]][gnu]\n\nWrite JSON API Clients in Python without the fluff, pumped full of\nsyntactic sugar\n\n```python\nfrom tiny_api_client import api_client, get, post, delete\n\n@api_client('https://example.org/api/public/v{version}')\nclass MyAPIClient:\n\t@get('/users/{user_id}')\n\tdef find_user(self, response):\n\t\treturn response\n\n\t@post('/notes')\n\tdef create_note(self, response):\n\t\treturn response\n\n\t@delete('/notes/{note_id}/attachment/{attachment_id}', version=3)\n\tdef delete_note_attachment(self, response):\n\t\treturn response\n\n\u003e\u003e\u003e client = MyClient()\n\u003e\u003e\u003e client.find_user(user_id='PeterParker')\n{'name': 'Peter', 'surname': 'Parker', ...}\n\u003e\u003e\u003e client.create_note(data={'title': 'New Note', 'content': 'Hello World!'})\n{'id': ...}\n\u003e\u003e\u003e client.delete_note_attachment(node_id=...)\n```\n\n\n\n## Features\n\n- Instance-scoped `requests.Session()` with connection pooling and\n  cookie preservation\n- JSON is king, but XML and raw responses are fine too\n- Endpoints can use GET, POST, PUT, PATCH, DELETE\n- Route parameters are optional\n- Easy integration with your custom API classes\n- Declare endpoints under different API versions\n- Can define the API URL at runtime if not available before\n- Can set a custom CookieJar to pass with all requests\n- Pass along any parameters you would usually pass to requests\n- Custom JSON status error handling\n- Installable [pytest plugin][pytest-plugin] for easy testing\n- Excellent support for type checking thanks to a built-in mypy plugin\n\n\n\n## Installation\n\n```bash\npip install tiny-api-client\n```\n\n\n\n## Documentation\n\nYou can find the documentation at\nhttps://tiny-api-client.readthedocs.io\n\n\n\n## License\n\n[![License: LGPL  v2.1][license-shield]][gnu]\n\nThis software is distributed under the\n[Lesser General Public License v2.1][license],\nmore information available at the [Free Software Foundation][gnu].\n\n\n\n\u003c!-- LINKS --\u003e\n\n[pytest-plugin]: https://github.com/sanjacob/pytest-tiny-api-client\n\n\n\n\u003c!-- LICENSE --\u003e\n\n[license]: LICENSE \"Lesser General Public License v2.1\"\n[gnu]: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html \"Free Software Foundation\"\n[license-shield]: https://img.shields.io/github/license/sanjacob/tiny-api-client\n\n\n\n\u003c!-- SHIELD LINKS --\u003e\n\n[pypi]: https://pypi.org/project/tiny-api-client\n\n\n\n\u003c!-- SHIELDS --\u003e\n\n[pypi-shield]: https://img.shields.io/pypi/v/tiny-api-client\n[build-shield]: https://img.shields.io/github/actions/workflow/status/sanjacob/tiny-api-client/build.yml?branch=master\n[docs-shield]: https://img.shields.io/readthedocs/tiny-api-client\n","funding_links":["https://github.com/sponsors/sanjacob"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjacob%2Ftiny-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanjacob%2Ftiny-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjacob%2Ftiny-api-client/lists"}