Basic REST client with extended logging
Project description
TREST client
Description
Basic REST client with extended logging.
Features
- Every request provide allure report step with all request and response data.
Report data organised in a way convenient for testing API and repeating issues in Postman. - Dataclass objects provided by
jto
library can be used as request body.
Useful for project organization. - Client configuration using
Config
module.- Print full request and response data to stdout. Useful for fast debugging.
- Provide oneline representation of request and response. Useful for mor accurate logging.
Examples
Basic usage:
from trest.rest_request import RESTRequest
request = RESTRequest(method='GET', url='https://api.ipify.org')
response = request.send()
Client configuration:
from trest.configuration.config import Config
Config.one_line_response = True
Config.print_response_to_std_out = True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
trest-1.4.1.tar.gz
(16.4 kB
view details)
Built Distribution
trest-1.4.1-py3-none-any.whl
(15.5 kB
view details)
File details
Details for the file trest-1.4.1.tar.gz
.
File metadata
- Download URL: trest-1.4.1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9819af5b93fa370eb048aaf4ef3410e5506ae0bbbd8991537d9fdbfc5b01f9fe |
|
MD5 | e2af8e75d923ab24d9a7166e6e843dba |
|
BLAKE2b-256 | 93e0ca59f77064d57cc7d72c9de4561264570088d93d05c8d1784bee5a27af87 |
File details
Details for the file trest-1.4.1-py3-none-any.whl
.
File metadata
- Download URL: trest-1.4.1-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50efaeb571e51036a5df1342fd32de1c164952bb4cf9e20b9ac1f7f8d7a40ecc |
|
MD5 | 5d304db28f0d1d0f7a132dcc883d3ea2 |
|
BLAKE2b-256 | e73b9938ec5a2d532118a6cd4eafc76c953140d3d9508f60e7b0bb482a25f1b7 |