Skip to main content

Auto Switch Providers

Project description

Auto Switch Providers

Install

Install the latest auto-switch-providers release via pip

pip install auto-switch-providers

How to use?

To use auto-switch-providers, you must first import it, like the following code:

from auto_switch_providers import AutoSwitchProviders

# Import path from os to get template path
from os import path

# Define config
TEMPLATE_CONFIG = {
    "custom_api_provider": {
        "http_service": {
            "params": {
                "token": ""
            }
        }
    },
}

# Init service
service = AutoSwitchProviders(
    template_dir=f"{path.dirname(__file__)}/templates",
    config=TEMPLATE_CONFIG
)

# Process
service.process({
    "custom_param": "example"
})

©️ License

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

auto_switch_providers-0.0.8.tar.gz (9.2 kB view hashes)

Uploaded Source

Built Distribution

auto_switch_providers-0.0.8-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page