Skip to main content

JSONRequest

Lightweight wrapper for requests library that only supports Content-Type: application/json.

This only supports GET, POST, PATCH, and DELETE http(s) request methods.

How to Use

First, install the package

pip install jsonrequest

Then, you can use the package.

>>> from jsonrequest import RequestModel, make_request
>>> r = make_request(RequestModel(endpoint="", method='GET', url='https://google.com'))
>>> r
<Response [200]>
>>> 

Note:

This data passed also only applies to application/json content.

Across multiple times over the past many years in my python projects, I found this codeblock repeated whenever I tried to make various http(s) requests using the requests library and thought it'd be much simpler to pass the method as a parameter instead of changing the function. Here's a medium article of how I created this package as a result. Hope this helps and Happy coding :)

  • by Justin

Metadata

Release files for jsonrequest 0.1.7

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

Source distribution (sdist)

Source distribution for jsonrequest 0.1.7
File Size Uploaded Provenance Actions
jsonrequest-0.1.7.tar.gz 2.6 kB Without provenance Details for jsonrequest-0.1.7.tar.gz

Release files / jsonrequest-0.1.7.tar.gz

Download URL jsonrequest-0.1.7.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
02a13e2e42fc1ebca518322b32771ed65fe416bf6ae265e3dd7b2ff41d12041a
BLAKE2b-256 checksum
How to use checksums
0cb6dae01e42b373f442c085d3a4c0901c15e5e203026e907ce331f40fe18c18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Security for jsonrequest 0.1.7

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