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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

intlib.py-0.0.3-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file intlib.py-0.0.3.tar.gz.

File metadata

  • Download URL: intlib.py-0.0.3.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for intlib.py-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7f58e9f41c1ebf6b12b5f40351e5a8dc200517996a1fa89602b6c9a026d476bd
MD5 8988d1112269d613083a2e1c5e81d3c6
BLAKE2b-256 4e24f0c0cdecbd08867154aacfcd7c55aa1ac3f4b74ea5b29ba1d9682ddbd3b7

See more details on using hashes here.

File details

Details for the file intlib.py-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: intlib.py-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for intlib.py-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c87753a2d2c0689540de62d69c0d92b95228eb91be403f1c83071fa28fbdcba2
MD5 c4269974e12264721776b7a8b34cace4
BLAKE2b-256 9a9aeddca7610853fc23559e2bf4e2e7d5140c36a412b35d93c46864c0b6298c

See more details on using hashes here.

Supported by

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