SDKs overview

Rig Veda offers a suite of Software Development Kits (SDKs) and community-contributed libraries designed to facilitate integration with its platform. These tools abstract away the complexities of direct API interaction, providing developers with idiomatic interfaces for various programming languages. The SDKs typically handle tasks such as authentication, request serialization, response deserialization, and error handling, allowing developers to focus on application logic rather than low-level HTTP communication. The design principles often follow best practices for API client development, as outlined in general recommendations for building robust API clients.

The official SDKs are developed and maintained by the Rig Veda team, ensuring compatibility with the latest API versions and features. Community libraries, on the other hand, are developed by third-party contributors and may offer support for additional languages or specialized use cases not covered by the official offerings. Developers should review the documentation and community support for any third-party library before integrating it into production systems.

Official SDKs by language

Rig Veda provides official SDKs for several popular programming languages, each designed to offer a native development experience. These SDKs are the recommended method for integrating with the Rig Veda platform due to their direct support and maintenance by the Rig Veda engineering team. Each SDK is typically distributed via its respective language's package manager.

Language Package Name Install Command Example Maturity
Python rigveda-py pip install rigveda-py Stable
Java com.rigveda:rigveda-java-sdk Add to pom.xml or build.gradle Stable
Node.js @rigveda/node-sdk npm install @rigveda/node-sdk Stable
Go github.com/rigveda/go-sdk go get github.com/rigveda/go-sdk Stable

For detailed API references and specific version compatibilities, developers should consult the Rig Veda official SDK documentation. The documentation provides comprehensive guides on how to use each SDK, including authentication methods, available methods, and data models.

Installation

Installation of Rig Veda SDKs typically follows standard practices for each programming ecosystem. The following examples demonstrate common installation procedures:

Python

To install the Python SDK, use pip, the Python package installer. Ensure you have a compatible Python version installed (e.g., Python 3.8+).

pip install rigveda-py

For more advanced usage, such as installing specific versions or managing dependencies in a virtual environment, refer to the Python packaging user guide.

Java

For Java projects, you can include the Rig Veda SDK as a dependency using Maven or Gradle. Below are examples for each build tool.

Maven (pom.xml)

<dependency>
    <groupId>com.rigveda</groupId>
    <artifactId>rigveda-java-sdk</artifactId>
    <version>1.0.0</version> <!-- Replace with the latest version -->
</dependency>

Gradle (build.gradle)

implementation 'com.rigveda:rigveda-java-sdk:1.0.0' // Replace with the latest version

After adding the dependency, your build tool will download and include the SDK in your project. For detailed instructions on managing Java dependencies, consult the Maven Getting Started Guide or the Gradle Dependency Management documentation.

Node.js

The Node.js SDK is available via npm, the Node.js package manager.

npm install @rigveda/node-sdk

If you are using Yarn, an alternative package manager, the command would be:

yarn add @rigveda/node-sdk

Refer to the npm install documentation for further details on package installation.

Go

To install the Go SDK, use the go get command.

go get github.com/rigveda/go-sdk

This command will download the package and its dependencies into your Go module cache. For information on Go modules and dependency management, see the Go Modules reference.

Quickstart example

This quickstart example demonstrates a basic interaction with the Rig Veda platform using the Python SDK. The example assumes you have an API key for authentication, which can be obtained from your Rig Veda developer dashboard.

Python Quickstart

import os
from rigveda_py import RigVedaClient

# Initialize the client with your API key
# It's recommended to store your API key as an environment variable
api_key = os.environ.get("RIGVEDA_API_KEY")
if not api_key:
    raise ValueError("RIGVEDA_API_KEY environment variable not set.")

client = RigVedaClient(api_key=api_key)

try:
    # Example: Fetching a list of available resources
    resources = client.resources.list()
    print("Available Rig Veda Resources:")
    for resource in resources:
        print(f"- ID: {resource.id}, Name: {resource.name}")

    # Example: Retrieving details for a specific resource (replace 'resource_id_123' with an actual ID)
    # specific_resource = client.resources.retrieve("resource_id_123")
    # print(f"\nDetails for Resource 'resource_id_123': {specific_resource.details}")

except Exception as e:
    print(f"An error occurred: {e}")

This example initializes the RigVedaClient using an API key retrieved from an environment variable. It then demonstrates how to list available resources. For more complex operations, such as creating, updating, or deleting resources, consult the specific method documentation within the Rig Veda Python SDK reference.

Community libraries

Beyond the official SDKs, the Rig Veda developer community has contributed various libraries and tools that extend integration possibilities. These community-driven projects often address niche requirements, provide wrappers for less common languages, or offer specialized functionalities.

Examples of potential community contributions could include:

  • PHP Client: A community-maintained client for PHP developers, enabling server-side integrations.
  • Ruby Gem: A Ruby Gem for integrating with Rig Veda services in Ruby on Rails or other Ruby applications.
  • CLI Tools: Command-line interface tools built on top of the SDKs for quick scripting and administrative tasks.
  • Framework Integrations: Libraries that provide seamless integration with popular web frameworks like Django, Flask, Laravel, or Spring Boot.

When considering community libraries, developers should evaluate several factors:

  • Maintenance Status: Is the library actively maintained and updated to support the latest Rig Veda API versions?
  • Documentation: Is the documentation clear, comprehensive, and up-to-date?
  • Community Support: Is there an active community (e.g., GitHub issues, forums) for assistance?
  • License: What open-source license governs the library's use?
  • Security Audits: Has the library undergone any security reviews?

While community libraries can offer valuable extensions, they typically do not receive the same level of official support or guarantees as the first-party SDKs. Developers are encouraged to check the Rig Veda Community & Forums page for a curated list of popular and well-regarded community projects, often linked directly to their GitHub repositories or respective package manager pages.