Mojo-native `requests` package that 7-8x faster than Python's

I’ve vibe-coded an almost pure Mojo implementation of requests (a few FFI calls to OpenSSL and libc for TLS/sockets), because I needed it for some internal projects.

Features:

  • HTTP/1.1 GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS, no Python/libcurl
  • HTTPS via OpenSSL (dlopen’d at runtime), cert verification on by default
  • Custom CA support: ca_bundle param, REQUESTS_CA_BUNDLE / SSL_CERT_FILE env vars, or verify=False for self-signed/internal certs
  • IPv4 + IPv6
  • Connection pooling / keep-alive, TLS session resumption
  • JSON bodies + parsing, redirects, cookie jar, streaming responses
  • HTTP proxy support (absolute-form + CONNECT tunneling)
  • Typed exceptions, Session API mirroring Python’s requests

This is only a proof-of-concept — I do not plan to publish or maintain it. But I’d be glad if someone else picks it up, or even if the Modular team wants to adopt parts of it into Mojo’s std.

Feel free to read or use it (Apache 2.0 license): GitHub - ormeilu/mojo-requests-poc: Pure Mojo implementation of Python's requests library (Proof-of-Concept) · GitHub

Cool! is already supported in flare and more!