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.11.tar.gz (6.8 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.11-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gawsoft_api_client-0.1.11.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gawsoft_api_client-0.1.11.tar.gz
Algorithm Hash digest
SHA256 b83a0680983501e60d8152eaca1f27b33b211cc454715733cf6d87f213bd58f8
MD5 d30a616e2bdddd0422f6322d7e754f51
BLAKE2b-256 17da5139431b7fe9e2a26bbb1406a77fda1b5787ee8c025fed20ce04f1d83386

See more details on using hashes here.

Provenance

The following attestation bundles were made for gawsoft_api_client-0.1.11.tar.gz:

Publisher: python-publish.yml on gawsoftpl/rest-api-client-framework-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for gawsoft_api_client-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 10e3d6987f773c96e1658bdcc9cf1171b3b80d281846a80692fdfeb5ff10efcf
MD5 487fb626ec23c4c393cfa2f2eda1ef30
BLAKE2b-256 fbc1c7cf483c2ce3f300ec41f61c14f466b920848c214d0d88cf8b84df31bb85

See more details on using hashes here.

Provenance

The following attestation bundles were made for gawsoft_api_client-0.1.11-py3-none-any.whl:

Publisher: python-publish.yml on gawsoftpl/rest-api-client-framework-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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