Skip to main content

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


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.2.0.tar.gz (13.7 kB view hashes)

Uploaded Source

Built Distribution

trest-1.2.0-py3-none-any.whl (13.2 kB view hashes)

Uploaded Python 3

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