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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gawsoft_api_client-0.0.7.tar.gz
Algorithm Hash digest
SHA256 857a8c0240e90af3c9c3ff11fbda1a06308b535ed58d22aab157462d51399096
MD5 48252c2112bec7ba8a6871d7ca1333a4
BLAKE2b-256 bd8b7caf5021a33a5576c003a9bc6718f1ef442d5aa8834b38530a2064e9b6f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gawsoft_api_client-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7be8cfcdfaade492e425e7775c42f17a07074f81b1a1626c4644152c98547359
MD5 88cd2e803b4de7cd4a9775b94e02f89a
BLAKE2b-256 d0a2f212f772c04e78091b89dd70e4c86ca10ff71aecf963b2c6c7dd526bd04e

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