Skip to content

gawsoftpl/rest-api-client-framework-python

Repository files navigation

Overall

Rest API client for Python

Simple REST API client for Python

Installation

Use the package manager pip to install our client in Python.

pip install gawsoft-api-client

OR

pip3 install gawsoft-api-client

Usage

Write your client api

from gawsoft.api_client import Request, Response


class Client(Request):
    def __init__(
        self,
        api_key: str,
        api_version: str ='',
        api_host: str = 'http://httpbin.org',
        user_agent: str = 'Example Api Python client'
     ):
        super().__init__(api_key, api_version, api_host, user_agent)

    def info(self, url: str, params: dict = {}) -> Response:
        return self.request(url, 'POST', params)


c = Client("abc")
response = c.info("delay/1")
print(response.status_code)
print(response.data())

Tests

make test
make mypy

Release

bin/release.sh

License

MIT

About

Simple framework for rest api client in Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published