Skip to main content

A REST API wrapper for requests

Project description

reqrest

Build Status Maintainability Coverage Status Requirements Status

A package for using REST APIs

Purpose

A lot of APIs are REST based, reqrest provides an easy way to use them.

Usage

Getting started is easy, first install the package using pip install reqrest

Next import it

from reqrest import REST
RESTAPI = REST('postman-echo.com')

Then query your API

RESTAPI.get('/get')

You can add custom headers

custom_headers = {"authorization": "Basic dXNlcm5hbWU6cGFzc3dvcmQ="}
RESTAPI = REST('postman-echo.com', headers=custom_headers)

Or querystrings

querystring = {}
querystring[pagesize] = 1000
RESTAPI.get('/get', querystring=querystring)

Have a read of examples/simple.py

Authentication

You can use basic_auth to create and store your headers / config

headers = Auth().read_config("basic_config.json")
RESTAPI = REST('postman-echo.com', headers=headers)

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

reqrest-1.0.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

reqrest-1.0.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file reqrest-1.0.1.tar.gz.

File metadata

  • Download URL: reqrest-1.0.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for reqrest-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dc25f9500bf1d9905042a0d698373fb9ea9ca99c1c16101f61a032ff64827973
MD5 494b1842c72e339f559a1fc17039a889
BLAKE2b-256 5ef57d369278c7056f20f21ada4da14531d271081009c39f3ec1ee67f3adeefa

See more details on using hashes here.

File details

Details for the file reqrest-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: reqrest-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for reqrest-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 425d2db2d6418846a3e58d961fc76a3f4748afd8a23237e55bf2e5ff34701563
MD5 e886828dd43ad6d73ca31fab9fcfea0e
BLAKE2b-256 aa7870e4b2ec6027ef55630d36bb465f16b8815cf48794751998c0250653991e

See more details on using hashes here.

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