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-0.0.7.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-0.0.7-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reqrest-0.0.7.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.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0

File hashes

Hashes for reqrest-0.0.7.tar.gz
Algorithm Hash digest
SHA256 e53664c0fa6749aa8d48d8e298dac1e172d33646803cc461b826d76a19f4e3ed
MD5 2714cabfb77c02e8357628aed846ca47
BLAKE2b-256 22bceebdcdd80353d2036814e76217eb20f5462d47b6d742dedabe7239642bdc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reqrest-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0

File hashes

Hashes for reqrest-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 15958b65353276f250af766d85f6dfacc769be1e15932f33a0d8c978f1235800
MD5 c6a7dff7b5a894cc2c98dd8848d5aa45
BLAKE2b-256 5648662b992ebe0203ba1092096e0478afff348ae88dc8fd1527b5122f4ba53d

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