16.6k sao GitHub và vẫn tăng — aio-libs/aiohttp là dự án Python mà TopGit đang theo dõi trên nền tảng. Asynchronous HTTP client/server framework for asyncio and Python
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
.. image:: https://readthedocs.org/projects/aiohttp/badge/?version=latest
:target: https://docs.aiohttp.org/
:alt: Latest Read The Docs
.. image:: https://img.shields.io/endpoint?url=https://codspeed.io/badge.json
:target: https://codspeed.io/aio-libs/aiohttp
:alt: Codspeed.io status for aiohttp
Key Features
Supports both client and server side of HTTP protocol.
Supports both client and server Web-Sockets out-of-the-box and avoids
Callback Hell.
Provides Web-server with middleware and pluggable routing.
Getting started
Client
To get something from the web:
.. code-block:: python
import aiohttp
import asyncio
async def main():
async with aiohttp.ClientSession() as session:
async with session.get('https://python.org') as response:
print("Status:", response.status)
print("Content-type:", response.headers['content-type'])
html = await response.text()
print("Body:", html[:15], "...")
Coming from requests <https://requests.readthedocs.io/>_ ? Read why we need so many lines <https://aiohttp.readthedocs.io/en/latest/http_request_lifecycle.html>_.
Server
An example using a simple server:
.. code-block:: python
# examples/server_simple.py
from aiohttp import web
async def handle(request):
name = request.match_info.get('name', "Anonymous")
text = "Hello, " + name
return web.Response(text=text)
async def wshandle(request):
ws = web.WebSocketResponse()
await ws.prepare(request)
async for msg in ws:
if msg.type == web.WSMsgType.text:
await ws.send_str("Hello, {}".format(msg.data))
elif msg.type == web.WSMsgType.binary:
await ws.send_bytes(msg.data)
elif msg.type == web.WSMsgType.close:
break
return ws
app = web.Application()
app.add_routes([web.get('/', handle),
web.get('/echo', wshandle),
web.get('/{name}', handle)])
if __name__ == '__main__':
web.run_app(app)
Documentation
https://aiohttp.readthedocs.io/
Demos
https://github.com/aio-libs/aiohttp-demos
External links
Third party libraries <https://aiohttp.readthedocs.io/en/latest/third_party.html>_
Built with aiohttp <https://aiohttp.readthedocs.io/en/latest/built_with.html>_
Powered by aiohttp <https://aiohttp.readthedocs.io/en/latest/powered_by.html>_
Feel free to make a Pull Request for adding your link to these pages!
The aiohttp community would like to thank Keepsafe
(https://www.getkeepsafe.com) for its support in the early days of
the project.
Source code
The latest developer version is available in a GitHub repository:
https://github.com/aio-libs/aiohttp
Benchmarks
If you are interested in efficiency, the AsyncIO community maintains a
list of benchmarks on the official wiki:
https://github.com/python/asyncio/wiki/Benchmarks
aio-libs/aiohttp có 16.6k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/aio-libs/aiohttp. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
aio-libs/aiohttp có những chủ đề gì?
GitHub topics của aio-libs/aiohttp: "aiohttp", "async", "asyncio", "hacktoberfest", "http", "http-client", "http-server", "python". TopGit xếp repo vào nhóm Backend.
aio-libs/aiohttp còn đang phát triển không?
Commit gần nhất trên aio-libs/aiohttp là 3 tháng trước (theo timestamp GitHub). Repo có 2.5k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
aio-libs/aiohttp là gì?
aio-libs/aiohttp (aio-libs/aiohttp) là dự án Python trên GitHub. Theo mô tả gốc: Asynchronous HTTP client/server framework for asyncio and Python
aio-libs/aiohttp so với các dự án Backend khác thế nào?
aio-libs/aiohttp được TopGit xếp vào nhóm Backend, với 16.6k sao GitHub và viết bằng Python. Xem trang chủ đề Backend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
aio-libs/aiohttp viết bằng ngôn ngữ gì?
aio-libs/aiohttp chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Vì sao aio-libs/aiohttp được xếp vào nhóm Backend?
TopGit xếp aio-libs/aiohttp vào nhóm Backend dựa trên GitHub topics và mô tả của repo (gắn thẻ: "aiohttp", "async", "asyncio"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
aiohttp có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về aiohttp.