https://github.com/fuongz/auto-switch-providers
đ Auto Switch Providers
https://github.com/fuongz/auto-switch-providers
auto-switch-providers python python-library requests-library-python
Last synced: 8 months ago
JSON representation
đ Auto Switch Providers
- Host: GitHub
- URL: https://github.com/fuongz/auto-switch-providers
- Owner: fuongz
- License: mit
- Created: 2024-05-24T09:32:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-11T05:35:10.000Z (over 1 year ago)
- Last Synced: 2025-02-14T23:20:00.353Z (9 months ago)
- Topics: auto-switch-providers, python, python-library, requests-library-python
- Language: Python
- Homepage: https://pypi.org/project/auto-switch-providers
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auto Switch Providers
## Install
Install the latest auto-switch-providers release via **pip**
```bash
pip install auto-switch-providers
```
## How to use?
To use `auto-switch-providers`, you must first import it, like the following code:
```python
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
- [MIT](/LICENSE)