{"id":17642864,"url":"https://github.com/tobetek/servus","last_synced_at":"2026-02-18T02:03:23.032Z","repository":{"id":52038166,"uuid":"482063899","full_name":"TobeTek/servus","owner":"TobeTek","description":"A wrapper for the aiohttp library for making asynchronous web requests in Python","archived":false,"fork":false,"pushed_at":"2022-08-11T23:40:06.000Z","size":434,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-27T15:27:29.396Z","etag":null,"topics":["aiohttp","async","asyncio","python","web"],"latest_commit_sha":null,"homepage":"https://tobetek.github.io/servus","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TobeTek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-15T19:28:06.000Z","updated_at":"2022-08-07T23:08:19.000Z","dependencies_parsed_at":"2022-08-13T01:20:14.961Z","dependency_job_id":null,"html_url":"https://github.com/TobeTek/servus","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/TobeTek/servus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TobeTek%2Fservus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TobeTek%2Fservus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TobeTek%2Fservus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TobeTek%2Fservus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TobeTek","download_url":"https://codeload.github.com/TobeTek/servus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TobeTek%2Fservus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29566366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T00:47:08.760Z","status":"online","status_checked_at":"2026-02-18T02:00:09.468Z","response_time":162,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aiohttp","async","asyncio","python","web"],"created_at":"2024-10-23T08:42:22.564Z","updated_at":"2026-02-18T02:03:23.011Z","avatar_url":"https://github.com/TobeTek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n# Servus\n\n[![PyPI version](https://badge.fury.io/py/servus.svg)](https://badge.fury.io/py/servus)\n[![PyPI license](https://img.shields.io/pypi/l/servus)](https://pypi.org/project/servus/1.0.0/)\n[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)\n\n\u003cbr\u003e\nA wrapper for the aiohttp library for making asynchronous web requests in Python.\n\nTrying to preserve speed and flexibility provided by `aiohttp`, without sacrificing the human-friendliness of `requests`,  `servus` abstracts using client sessions and context managers when making asynchronous HTTP requests in Python.\n\nExample usage:\n```py\nimport servus\nimport aiohttp\nimport asyncio\n\nasync def main():\n\t# Create a new session\n\tmy_session = servus.ClientSession()\n\n\t# Use Servus to send a request.\n\t# Servus automatically parses and serializes the response, and returns a ready to use object\n\tresponse = await servus.get(my_session, \"http://httpbin.org/get\")\n\n\tprint(response.json) # (dict)\n\tprint(response.response) # (aiohttp.ClientResponse)\n\n\t# Remeber to close the session!\n\tmy_session.close()\n\nasyncio.run(main())\n```\n\n`servus` also has inbuilt support for working with Discord bots.\n\nExample Usage:\n```py\nimport discord\nfrom discord.ext import commands\nimport asyncio\nimport servus\nfrom servus.discord_utils import create_requests_client\n\nMY_TOKEN = \"\u003cYOUR_TOKEN\u003e\"\nbot = commands.Bot(command_prefix=commands.when_mentioned_or(\"!\"))\n\n\n@bot.command()\nasync  def hello(ctx):\n\t\"\"\"Hello world, with a HTTP request!\"\"\"\n\tr = await servus.get(bot.session,\"https://httpbin.org\")\n\tdata = r.json\n\tawait ctx.send(f\"World! {data}\")\n\n# Add the createRequestClient coroutine to `bot` async loop\nbot.loop.create_task(create_requests_client(bot))\n\n# Run the bot\nbot.run(MY_TOKEN)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobetek%2Fservus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobetek%2Fservus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobetek%2Fservus/lists"}