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.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reqrest-1.0.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reqrest-1.0.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for reqrest-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bb4f12b5964f7782a71fa7afcf5fe8419028bb75ed055d49c959562e0dabfa1a
MD5 c6eda5409f229d0f61bc56f84d254b39
BLAKE2b-256 072de3e0b6f82c3bd919acc8f0c037f42f34a4bc7389c8d583f02cfd67c05f34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reqrest-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for reqrest-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a9c858eb1bf0d0f84e475cdea9452822d255ce4d46796619acbe37fbad9b2ff
MD5 87e760c55a2e639c20cf19aef99e12ee
BLAKE2b-256 92539628994b2c8cabe5a6173de4ea965f1375032ee2e82f75afda128b4f5b74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page