Skip to main content

rest-requests

PyPI - Version PyPI - Python Version


Lightweight asynchronous REST API requests. JSON bodies only. Proxy support.

Installation

pip install rest-requests

Usage

import asyncio

from rest_requests import request, RequestMethod


async def main():

    response = await request(
        method=RequestMethod.POST,
        url="https://jsonplaceholder.typicode.com/posts",
        # headers={"key": "value"},
        body={"title": "foo", "body": "bar", "userId": 1},
        # proxy_url="socks5://localhost:8080
    )

    assert response == {
        "userId": 1,
        "id": 101,
        "title": "foo",
        "body": "bar",
    }


if __name__ == "__main__":
    asyncio.run(main())

Contributors

License

rest-requests is distributed under the terms of the CC-BY-SA-4.0 license.

Metadata

Release files for rest-requests 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rest-requests 2.1.0
File Size Uploaded Provenance Actions
rest_requests-2.1.0.tar.gz 12.0 kB Without provenance Details for rest_requests-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rest-requests 2.1.0
File Interpreter ABI Platform Actions
rest_requests-2.1.0-py3-none-any.whl Python 3 none any Details for rest_requests-2.1.0-py3-none-any.whl

Total release size: 22.7 kB

Release files / rest_requests-2.1.0.tar.gz

Download URL rest_requests-2.1.0.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3fd98a1b49f573d167e5d905a75e1d3910d5b52c0c44e5ce288c35646121e4c9
BLAKE2b-256 checksum
How to use checksums
fda034c318b1f5dff69473d03416725fdbefc48afe6772e8a1542d0d2bdfc3df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Release files / rest_requests-2.1.0-py3-none-any.whl

Download URL rest_requests-2.1.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97b9d2c8f5700178021ce9d64ab2cf714602fd3632bbd99193477659e725f61b
BLAKE2b-256 checksum
How to use checksums
7127bed392e6fe82f5428ca042dbb619657676c7cb4d5aac746dc890b0485ee4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Security for rest-requests 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page