Integroh Connector Python Library
Project description
Integroh Connector Python Library
This Python library, IntegrohConnector
, is designed to handle API requests and responses for the Integroh service. The Integroh service integrates with other services like Keycloak and Dropbox.
Installation
To install the library, you can use pip:
pip install initlib.py
Usage
Here is a basic example of how to use the IntegrohConnector
class:
from integroh_connector import IntegrohConnector
connector = IntegrohConnector()
service_data = {
'username': 'your_username',
'password': 'your_password'
}
response = connector.connect('keycloak', 'POST', service_data)
you need to creata a integroh.ini file in root like this:
{
"api_key": "1234567890abcdef",
"base_url": "http://localhost:5000/connect/"
}
Methods
The IntegrohConnector
class provides the following methods:
__init__
: Initializes the connector with default values.validate_service
: Validates the provided service.validate_request_type
: Validates the provided request type.load_initfile
: Loads the configuration from a file namedintegroh.ini
.request_service
: Makes an API request to the specified service.validate_service_data
: Validates the provided service data.connect
: Main method to connect to a service.
Exceptions
The library defines the following exceptions:
ValidationError
: Raised when there is a validation error.ConError
: Raised when there is a connection error.
Documentation
For more detailed information, please refer to the official documentation.
Contributing
Contributions are welcome. Please submit a pull request or create an issue to discuss the changes.
License
This project is licensed under the GPL-3.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for intlib.py-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c87753a2d2c0689540de62d69c0d92b95228eb91be403f1c83071fa28fbdcba2 |
|
MD5 | c4269974e12264721776b7a8b34cace4 |
|
BLAKE2b-256 | 9a9aeddca7610853fc23559e2bf4e2e7d5140c36a412b35d93c46864c0b6298c |