This release is a pre-release and may not be stable for production use.
simple_rest_call
This module wraps Requests into a simple call, specifically for JSON-request and JSON-response with datetime support. By default, Windows single sign-on authentication is used for convenience in enterprise environment.
rest(url:str, data=None, method:str='POST', auth=(None,None), **kwargs)
- url:
The URL for the RESTful call.
- data:
The payload to be passed in the request body. Any incoming Python object will be encoded as JSON content except it is already a string or bytes. Content-Type: application/json; charset=utf-8 will be added into the request header if the object is converted to JSON inside this function.
- method:
(default: POST) Method for the request: GET, POST, PUT, PATCH, DELETE, OPTIONS, or HEAD.
- auth:
(The user’s default credentials are used for Windows single sign-on by default) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
- kwargs:
(optional) Please refer to https://requests.readthedocs.io for other optional arguments.
- return:
A JSON decoded object if the response content type is a valid JSON, otherwise the text content will be tried to return.
A quick example can be found from https://github.com/DataBooster/PyWebApi/blob/master/Sample/UserApps/MdxReader/mdx_task.py
Metadata
Release files for simple-rest-call 0.1b4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simple_rest_call-0.1b4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for simple_rest_call-0.1b4-py2.py3-none-any.whl |
Release files / simple_rest_call-0.1b4-py2.py3-none-any.whl
| Download URL | simple_rest_call-0.1b4-py2.py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ce871370d3aa1c6a4b7679f5aef9029ecd5119a49a6b89a672753954ba84823c
|
|
BLAKE2b-256 checksum How to use checksums |
a38038b23913121498ac2ac42aae8b048dfe7841e7b60f0505f8856ef9e0429d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.6
|
Security for simple-rest-call 0.1b4
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.