Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Base API Client Library

Project description

 ___                   _   ___ ___    ___ _ _         _   
| _ ) __ _ ___ ___    /_\ | _ \_ _|  / __| (_)___ _ _| |_ 
| _ \/ _` (_-</ -_)  / _ \|  _/| |  | (__| | / -_) ' \  _|
|___/\__,_/__/\___| /_/ \_\_| |___|  \___|_|_\___|_||_\__|

platform python 0%

Base module for REST API clients.

Installation

pip install base-api-client

Basic Usage

This modules' primary use-case is inheritance from other REST API clients.

from base_api_client import BaseApiClient
from typing import Optional, Union

class SomeApiClient(BaseApiClient):
    def __init__(self, cfg: Union[str, dict], sem: Optional[int] = None):
        BaseApiClient.__init__(self, cfg=cfg, sem=sem or self.SEM)

    def __aenter__(self):
        return self

    def __aexit__(self, exc_type, exc_val, exc_tb):
        await BaseApiClient.__aexit__(self, exc_type, exc_val, exc_tb)

Documentation

GitHub Pages

  • Work in Process

License

Copyright © 2019 Jerod Gawne https://github.com/jerodg/

This program is free software: you can redistribute it and/or modify it under the terms of the Server Side Public License (SSPL) as published by MongoDB, Inc., either version 1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the SSPL for more details.

You should have received a copy of the SSPL along with this program. If not, see https://www.mongodb.com/licensing/server-side-public-license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for base-api-client, version 0.8.4
Filename, size File type Python version Upload date Hashes
Filename, size base_api_client-0.8.4-py2.py3-none-any.whl (27.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size base-api-client-0.8.4.tar.gz (20.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page