Skip to main content

No project description provided

Project description

rust_requests

rust_requests is a blazing fast async/await HTTP client for Python written on Rust using reqwests.


Overview

import asyncio
import datetime

import rust_requests


async def main():
    client = rust_requests.Client(
        user_agent="rust_requests/1.0",
        headers={"X-Foo": "bar"},
        store_cookie=True
    )
    request = rust_requests.Request(
        "GET", "https://google.com/search",
        ),
        query={"q": "hi"},
        headers={"X-Bar": "foo"},
        timeout=datetime.timedelta(seconds=30),
    )
    response = await client.send(request)
    print(response.status)
    data = await response.json()
    data.show()


asyncio.run(main())

## Installlation
Currently the library is not published to PyPI, so the only way to install it is from GitHub:
```bash
python -m pip install -U https://github.com/cop-discord/rust_requests/archive/main.zip

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rust_requests-0.1.0b1.tar.gz (565.3 kB view hashes)

Uploaded Source

Built Distribution

rust_requests-0.1.0b1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page