Skip to main content

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 named integroh.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


Download files

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

Source Distribution

intlib.py-0.0.3.tar.gz (16.6 kB view hashes)

Uploaded Source

Built Distribution

intlib.py-0.0.3-py3-none-any.whl (16.5 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