Skip to main content

Rest Api Client

Project description

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

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

gawsoft_api_client-0.1.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

gawsoft_api_client-0.1.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file gawsoft_api_client-0.1.1.tar.gz.

File metadata

  • Download URL: gawsoft_api_client-0.1.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for gawsoft_api_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 145bf04d83ed252b7dd7d06e1bf2d17fbb008868705966a785a584b0d3c22c1f
MD5 04ce7330df865cefaad9991878b1b9e5
BLAKE2b-256 fecfcbfb3886bb750d92def7ef99bc953aeed0499278545c754925450178bc5d

See more details on using hashes here.

File details

Details for the file gawsoft_api_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gawsoft_api_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f32dfa1759ed35c910fa88959597aa44d7b17dfd2ce7a4ace1bbf8dc981b637
MD5 9e0dc6e2a29bb7c6d5fe4361fb30467d
BLAKE2b-256 2d3a6cd56537bd51405ea10799b5e314a8f8f87067479a4d337984442c5b32b0

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