Skip to content

ionos-cloud/sdk-python-kafka

Repository files navigation

ionoscloud-kafka

A managed Apache Kafka cluster is designed to be highly fault-tolerant and scalable, allowing large volumes of data to be ingested, stored, and processed in real-time. By distributing data across multiple brokers, Kafka achieves high throughput and low latency, making it suitable for applications requiring real-time data processing and analytics.

This Python package is automatically generated by the OpenAPI Generator project:

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/ionos-cloud/sdk-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/ionos-cloud/sdk-python.git)

Then import the package:

import ionoscloud_kafka

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import ionoscloud_kafka

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import ionoscloud_kafka
from ionoscloud_kafka.rest import ApiException
from pprint import pprint
import os

# Defining the host is optional and defaults to https://kafka.de-fra.ionos.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_kafka.Configuration(
    host = "https://kafka.de-fra.ionos.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): tokenAuth
configuration = ionoscloud_kafka.Configuration(
    token = os.environ["IONOS_TOKEN"]
)


# Enter a context with an instance of the API client
with ionoscloud_kafka.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_kafka.ClustersApi(api_client)
    cluster_id = 'e69b22a5-8fee-56b1-b6fb-4a07e4205ead' # str | The ID (UUID) of the Cluster.

    try:
        # Delete Cluster
        api_instance.clusters_delete(cluster_id)
    except ApiException as e:
        print("Exception when calling ClustersApi->clusters_delete: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://kafka.de-fra.ionos.com

Class Method HTTP request Description
ClustersApi clusters_delete DELETE /clusters/{clusterId} Delete Cluster
ClustersApi clusters_find_by_id GET /clusters/{clusterId} Retrieve Cluster
ClustersApi clusters_get GET /clusters Retrieve all Clusters
ClustersApi clusters_post POST /clusters Create Cluster
TopicsApi clusters_topics_delete DELETE /clusters/{clusterId}/topics/{topicId} Delete Topic
TopicsApi clusters_topics_find_by_id GET /clusters/{clusterId}/topics/{topicId} Retrieve Topic
TopicsApi clusters_topics_get GET /clusters/{clusterId}/topics Retrieve all Topics
TopicsApi clusters_topics_post POST /clusters/{clusterId}/topics Create Topic
UsersApi clusters_users_access_get GET /clusters/{clusterId}/users/{userId}/access Retrieve Apache Kafka User with Credentials
UsersApi clusters_users_get GET /clusters/{clusterId}/users Retrieve all Users

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

tokenAuth

  • Type: Bearer authentication (JWT)

Author

support@cloud.ionos.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •