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

Uploaded Python 3

File details

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

File metadata

  • Download URL: reqrest-0.0.8.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.45.0 CPython/3.8.2

File hashes

Hashes for reqrest-0.0.8.tar.gz
Algorithm Hash digest
SHA256 44073bce7b250e84ed76cc9cf00cd1c58a461707fb944e5a272a2f43f480826d
MD5 e958336547258e9039cd306244518621
BLAKE2b-256 e0094a0675f8b506217929b466afe1342a26185994b549a533910feb1ee48c0e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reqrest-0.0.8-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.45.0 CPython/3.8.2

File hashes

Hashes for reqrest-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 23a857c70e7ad2b65a25edcf3379bd56b343859424564aa0e2106c75559795cb
MD5 6e0e1b08201d609971cabd4de8be38d2
BLAKE2b-256 172d7af6f26725642274d9e0a6528762dad522ee7e5322f3c21397ecdbfa69e4

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