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

Uploaded Python 3

File details

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

File metadata

  • Download URL: reqrest-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 e93aabe23fba9f4cc9bbea02f59a9d14fe6de3c730f0c4ea903c4a7ca2efd6fd
MD5 780162735a221de1ad9dbc844437a606
BLAKE2b-256 42baa522cd0f96d0df74bbbb28e3ff1a58c0da79cb682ada7303d7131a0c5075

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reqrest-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 23dbb5d297eec454c31a49775b370ecca3c1510208b86f676243aea1c17a13e1
MD5 210db2312afe17cd4a5f244c7357cf31
BLAKE2b-256 212fc42cc73867d4aa29650d2bdcef358b0fce8ea9bd91969611b6cd8bfb5e30

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