Skip to main content

RapidaAI SDK to integrate rapida.ai APIs

Project description

Rapida Python SDK

Build and Publish Python SDK

The Rapida Python SDK provides a powerful interface for interacting with Rapida AI services. This SDK simplifies the process of making API calls, handling authentication, and managing responses from Rapida endpoints.

Installation

To install the Rapida Python SDK, use the following command:

pip install rapida-python

Quick Start

Here's how to get started with the Rapida Python SDK:

from rapida import (
    ConnectionConfig,
)
from pprint import pprint


connection_config = ConnectionConfig.default_connection_config(
    ConnectionConfig.with_sdk(
        "{your-api-key-here}"  # Replace with your actual API key
    )
)

Authentication

You can configure the Rapida SDK to authenticate using your API Key or Personal Token:

Authenticating with API Key

import os
from rapida.connections import ConnectionConfig
connection_config = ConnectionConfig.with_sdk(
    os.environ["RAPIDA_API_KEY"]  # API Key from environment variables
)

Authenticating with Personal Token

import os
from rapida.connections import ConnectionConfig

connection_config = ConnectionConfig.with_personal_token(
  os.environ["RAPIDA_AUTHORIZATION_TOKEN"],  # Authorization Token
  os.environ["RAPIDA_AUTH_ID"],              # Authentication ID
  os.environ["RAPIDA_PROJECT_ID"],           # Project ID
)

Configuration Options

The DefaultConnectionConfig accepts multiple options for configuring the SDK. Key options include:

  • with_sdk(api_key: str): Sets the API key for authentication.
  • with_personal_token(auth_token: str, auth_id: str, project_id: str): Configures the connection for personal tokens.
  • with_endpoint_url(url: str): Overrides the default API endpoint URL.
  • with_timeout(timeout: float): Sets the timeout for API requests (in seconds).

Compatibility

This SDK requires Python 3.8 or later. Ensure your system meets this requirement:

python --version

To upgrade or specify a version, use the following command:

pip install --upgrade rapida-python

Conclusion

The Rapida Python SDK provides everything necessary to integrate seamlessly with Rapida AI services, offering flexible configuration and authentication options. With the examples provided, you should be able to get started quickly and make advanced API calls as needed.

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

rapida_python-0.1.18.tar.gz (102.8 kB view details)

Uploaded Source

Built Distribution

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

rapida_python-0.1.18-py3-none-any.whl (140.7 kB view details)

Uploaded Python 3

File details

Details for the file rapida_python-0.1.18.tar.gz.

File metadata

  • Download URL: rapida_python-0.1.18.tar.gz
  • Upload date:
  • Size: 102.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for rapida_python-0.1.18.tar.gz
Algorithm Hash digest
SHA256 47aea05b2cade31b647fb8559ee416a1d167ac4e32e9ce4108ea48d48cfa0c3a
MD5 148caf46d8c6f53eeebfbe7e4013fc14
BLAKE2b-256 c8dbe206a062da9a5e9c0f506ddfac4a3af7c36286af3d22155169947d3f6771

See more details on using hashes here.

File details

Details for the file rapida_python-0.1.18-py3-none-any.whl.

File metadata

  • Download URL: rapida_python-0.1.18-py3-none-any.whl
  • Upload date:
  • Size: 140.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for rapida_python-0.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 4de9744cb908499e7ac7b795d40a21bc5da9b468f4354a62e4eab1c62026ec5d
MD5 add6db255467ec22f24ceec31e9722aa
BLAKE2b-256 f47c381e21b56d05364aec1ea26eb4a27093d21ed9022d262ea7f5f9a295721e

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