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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gawsoft_api_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8e914a8560e6285914d5093df41ec204d649433b8b259aa684c0871964c47732
MD5 db38742a8ed54ccd83b673ccd8ac338a
BLAKE2b-256 b70e839da25fbab1d1bf00d9a4e4e199503ec73657c45b396fda1ae19e57dc20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gawsoft_api_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f42a627cab8dc11cff13e21f9a0d032ee9f251919120f243b96343f0e7a72510
MD5 02f96ca050be8aeb5c3db66bac1e6839
BLAKE2b-256 32c62fd6bbdcba5741bcac06a07459142bfef74c09dacb077a7ac0e451b68256

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