Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何将同步函数包装在异步协程中?
我在用着aiohttp https github com aio libs aiohttp构建一个 API 服务器 将 TCP 请求发送到单独的服务器 发送 TCP 请求的模块是同步的 对于我来说是一个黑匣子 所以我的问题是这些请求阻塞了整
python
python3x
Asynchronous
pythonasyncio
aiohttp
asyncio 多个并发服务器
我正在尝试使用 Python 的 asyncio 一起运行多个服务器 并在它们之间传递数据 对于我的具体情况 我需要一个带有 websocket 的 Web 服务器 与外部设备的 UDP 连接以及数据库和其他交互 我可以找到几乎所有这些单独
python
python3x
pythonasyncio
aiohttp
Requests/aiohttp:关闭响应对象
我对是否需要感到有点困惑 close 两者中的响应对象requests and aiohttp 请注意 这是一个单独的实例方法 而不是session close 我说的是响应对象本身 Does Response requests or Cl
python
pythonrequests
aiohttp
python37
多个 aiohttp Application() 在同一进程中运行?
Can two aiohttp web Application 对象在同一进程中运行 例如在不同的端口上 我看到了一堆 aiohttp 代码的示例 例如 from aiohttp import web app web Application
python
pythonasyncio
aiohttp
有没有办法将aiohttp客户端与socks代理一起使用?
好像aiohttp ProxyConnector doesn t https github com KeepSafe aiohttp blob master aiohttp connector py L639支持socks代理 有什么解决方
python
aiohttp
如何在 Python 中使用 httpx(相对于 aiohttp)发出并行异步 HTTP 请求?
这是基于一个拼写错误 而且是一个简单的错误 不删除 因为它有 httpx 的示例代码 我正在尝试利用杠杆asyncio并行化几个长时间运行的网络请求 因为我是从requests图书馆 我想使用httpx库 由于相似的 API 我的环境是 P
python
Asynchronous
pythonasyncio
aiohttp
当客户端不正常退出时,如何检测服务器上 Python aiohttp Web 套接字的关闭
我有一个简单的命令和控制服务器server py 完全不安全 不要使用 被动客户端update client py和另一个可以发送命令的客户端update commander py 有一个 http 端点http 0 0 0 0 8080
python
aiohttp
将 Aiohttp 与代理一起使用
我正在尝试使用异步从 url 列表 由 ids 标识 中获取 HTML 我需要使用代理 我正在尝试将 aiohttp 与代理一起使用 如下所示 import asyncio import aiohttp from bs4 import Be
python
Asynchronous
pythonasyncio
aiohttp
aiohttp.client_exceptions.ClientConnectorError:无法连接到主机 stackoverflow.com:443 ssl:default [连接调用失败('151.101.193.69', 443)]
这是我的代码 import asyncio from aiohttp import ClientSession async def main url https stackoverflow com async with ClientSess
python
python3x
pythonasyncio
aiohttp
pythonanywhere
在 aiohttp Web 服务器中使用 ClientSession 的正确方法是什么?
我有一个网络服务器 大致如下 async def websocket handler request ws web WebSocketResponse await ws prepare request cards async for msg
aiohttp
Aiohttp、Asyncio:运行时错误:事件循环已关闭
我有两个脚本 scraper py 和 db control py 在 scraper py 我有这样的东西 def scrape category field pages search use proxy proxy file loop
python
python3x
pythonasyncio
aiohttp
RuntimeError:异常被忽略:
这个问题在这里已经有答案了 我在用aiohttp asyncio and 代码定时发出并发请求 我最近将 Python 升级到版本 3 9 0 并且收到 RuntimeError Event Loop is close after the
python
python3x
asyncawait
pythonasyncio
aiohttp
如何将 pytest-aiohttp 装置与范围会话一起使用
我正在尝试为 aiohttp 应用程序编写测试 我正在使用 pytest aiohttp 插件 我的目的是在第一次测试执行之前初始化并运行应用程序一次 并在所有测试完成后拆除 pytest aiohttp 固定装置 例如 loop test
python
Pytest
fixtures
aiohttp
Aiohttp 在浏览器正常打开的某些网站上引发证书错误
代码示例 import aiohttp import asyncio async def main url async with aiohttp ClientSession as session async with session get
python
sslcertificate
aiohttp
使用 aiohttp 嵌套“异步”
我想创建一个使用 aiohttp 进行 API 调用的调度程序类 我试过这个 import asyncio import aiohttp class MySession def init self self session None asy
python
pythonasyncio
aiohttp
Python 包 - aiohttp 有警告消息“未关闭的客户端会话”
我的代码如下 import asyncio import aiohttp urls http www 163 com http www sina com cn https www hupu com http www csdn net asy
python
pythonasyncio
aiohttp
线程中的服务器(Python3.9.0+aiohttp):RuntimeError:关闭后无法注册atexit
这段代码 在线程中运行的最小服务器 代码取自here https stackoverflow com questions 51610074 how to run an aiohttp server in a thread 在 Python3
python3x
Multithreading
aiohttp
Python 3.5 async for 阻止 ioloop
我有一个带有两个处理程序的简单 aiohttp 服务器 第一个在中进行一些计算async for环形 第二个仅返回文本响应 not so long operation以最慢的递归实现返回第 30 个斐波那契数 大约需要一秒钟 def not
python
python3x
asyncawait
pythonasyncio
aiohttp
了解 aiohttp.TCPConnector 池和连接限制
我正在尝试limit and limit per host参数为aiohttp connector TCPConnector 在下面的脚本中 我通过connector aiohttp connector TCPConnector limit
python
python3x
pythonasyncio
aiohttp
如何通过代理连接不和谐机器人
我正在尝试使用discord py 并通过代理运行discord 机器人 这关于此的不一致文档 https discordpy readthedocs io en latest api html highlight proxy discor
Discord
aiohttp
1
2
3
»