Bundled in C-extension mode — the real Cython accelerators are cross-compiled
for iOS arm64, not the pure-Python fallback: _http_parser (llhttp), _http_writer,
plus C-extension builds of its dep stack (multidict._multidict, yarl._quoting_c,
frozenlist._frozenlist, propcache, aiosignal, aiohappyeyeballs). Built via
aiohttp_ios/build_aiohttp.sh.
- Client:
aiohttp.ClientSession— GET/POST/streaming, JSON, timeouts, cookies, connection pooling, WebSocket client (ws_connect) - Server:
aiohttp.web— routes, middlewares, WebSockets, served on localhost the same way flask/dash/streamlit run in-app (bind127.0.0.1, open the preview pane) - asyncio event loop on iOS works normally (single process)
| Feature | Status | Workaround |
|---|---|---|
aiodns resolver |
Not bundled (needs pycares C ext) |
Default threaded resolver is used automatically |
| Brotli response decoding | brotli/brotlicffi not bundled |
gzip/deflate work; request Accept-Encoding: gzip |
| Client certs from the iOS keychain | Python's ssl uses certifi, not the system store | Pass ssl=ssl_context with your own CA/cert files |
| Multi-process server workers | iOS forbids fork() |
Single event-loop process (plenty for on-device serving) |
- PEP 517 project with no
setup.py→ built withpip wheel --no-build-isolation - One C++ Cython extension needs Python headers baked into
CXX(-I$PY_HDRS) — plain CC/CFLAGS isn't enough
- requests.md / urllib3.md — the sync stack
- web-stack.md — running servers on-device