SDKs overview

Cloudmersive offers a range of Software Development Kits (SDKs) designed to streamline the integration of its various API services into applications. These SDKs abstract the underlying HTTP requests, JSON parsing, and authentication mechanisms, allowing developers to interact with the Cloudmersive platform using native language constructs. The SDKs are available for several popular programming languages, facilitating development across different ecosystems while adhering to each language's conventions. The core purpose of these libraries is to reduce the boilerplate code required for API interaction, thus accelerating development cycles for tasks such as virus scanning files, converting document formats, or performing email validation.

Each SDK is typically generated from the Cloudmersive API specification, ensuring consistency and accuracy with the latest API endpoints and data models. This approach supports a wide array of individual APIs, from Cloudmersive Virus Scan APIs to Cloudmersive Document Conversion APIs, allowing developers to pick and choose the specific functionalities they need. The comprehensive Cloudmersive developer overview provides further details on the scope and capabilities of the available APIs and their integration points. Developers can obtain a free API key for initial testing and development, allowing up to 800 API calls per month.

Official SDKs by language

Cloudmersive maintains official SDKs for a broad spectrum of programming languages, developed and supported internally to ensure compatibility and stability. These SDKs are the recommended method for integrating Cloudmersive APIs into new and existing projects. They are distributed through standard package managers for each respective language, simplifying dependency management and updates. Each SDK includes client classes, data models representing API inputs and outputs, and methods corresponding to the various Cloudmersive API endpoints. The official Cloudmersive developer documentation provides detailed instructions and examples for each language-specific SDK.

Language Package Manager / Repository Install Command Example Maturity
C# NuGet Gallery Install-Package Cloudmersive.API.Client.NET Production Ready
Java Maven Central <dependency><groupId>com.cloudmersive</groupId><artifactId>cloudmersive-api-client</artifactId><version>[latest]</version></dependency> Production Ready
Node.js npm npm install cloudmersive-api-client --save Production Ready
Python PyPI pip install cloudmersive-validate-api Production Ready
PHP Packagist (Composer) composer require cloudmersive/cloudmersive-api-client Production Ready
Go Go Modules go get github.com/cloudmersive/cloudmersive-go-client/v2/cloudmersive_validate_api Production Ready
Ruby RubyGems gem install cloudmersive-api-client Production Ready
Objective-C CocoaPods pod 'CloudmersiveAPIClient' Production Ready

Installation

Installing Cloudmersive SDKs typically involves using the standard package manager for your chosen programming language. This method ensures that all necessary dependencies are resolved and that the SDK is correctly integrated into your project's build system. For each language, the installation process is designed to be straightforward, usually requiring a single command or a few lines in a configuration file.

C#

For .NET projects, the Cloudmersive C# SDK is distributed via NuGet. You can install it using the NuGet Package Manager Console in Visual Studio or via the .NET CLI:

Install-Package Cloudmersive.API.Client.NET

Alternatively, use the .NET CLI for project-level installation:
dotnet add package Cloudmersive.API.Client.NET

This adds the Cloudmersive client library as a dependency to your .csproj file. More details are available in the Cloudmersive .NET SDK documentation.

Java

Java developers can add the Cloudmersive Java SDK to their projects using Maven or Gradle. For Maven, include the dependency in your pom.xml:

<dependency>
    <groupId>com.cloudmersive</groupId>
    <artifactId>cloudmersive-api-client</artifactId>
    <version>[latest_version]</version>
</dependency>

Replace [latest_version] with the current stable version found on Maven Central Repository for Cloudmersive. For Gradle, add to your build.gradle file:
implementation 'com.cloudmersive:cloudmersive-api-client:[latest_version]'

The SDK requires Java 8 or newer and handles HTTP communication and JSON serialization internally.

Node.js

The Cloudmersive Node.js SDK is available via npm. Install it globally or as a project dependency:

npm install cloudmersive-api-client --save

This command adds the SDK to your package.json file. The Node.js SDK supports both CommonJS and ES Modules, making it adaptable to various project setups. It is compatible with Node.js versions 10 and above. Review the Cloudmersive Node.js SDK details for specific module import instructions.

Python

Python developers can install the Cloudmersive Python SDK using pip:

pip install cloudmersive-validate-api

A specific client, such as cloudmersive-validate-api, is often chosen based on the API category (e.g., validation, virus scan). Python 3.6+ is required. The Python SDK includes client classes and data models, simplifying interactions with diverse Cloudmersive API endpoints like Cloudmersive email and phone validation.

Quickstart example

This Python example demonstrates how to use the Cloudmersive Virus Scan API to scan a file for malware. This quickstart assumes you have already installed the cloudmersive-validate-api package and obtained your API key from the Cloudmersive developer portal.


import cloudmersive_validate_api
from cloudmersive_validate_api.rest import ApiException
import os

# Configure API key authorization: Apikey
configuration = cloudmersive_validate_api.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = cloudmersive_validate_api.VirusScanApi(cloudmersive_validate_api.ApiClient(configuration))

try:
    # Scan a file for viruses
    with open('path/to/your/file.txt', 'rb') as file_to_scan:
        api_response = api_instance.virus_scan_scan_file(file_to_scan)
        print("Virus scan result:")
        print(api_response)
except ApiException as e:
    print("Exception when calling VirusScanApi->virus_scan_scan_file: %s\n" % e)

In this example:

  • YOUR_API_KEY should be replaced with your actual Cloudmersive API Key.
  • 'path/to/your/file.txt' should be replaced with the actual path to the file you wish to scan.
  • The virus_scan_scan_file method uploads the file and returns a response indicating whether a virus was found. The CleanResult field in the API response will be True if no threats are detected.

This pattern of API key configuration and method invocation is consistent across most Cloudmersive SDKs, adapting to the specific language's syntax and conventions. Further examples for other APIs, such as image object recognition or document format conversion, follow a similar structure.

Community libraries

While Cloudmersive provides comprehensive official SDKs, the open nature of APIs often encourages community-driven development of additional tools and libraries. These community contributions can include alternative client implementations, utility wrappers, or integrations with specific frameworks not directly covered by official SDKs. As of the current date, the primary recommended method for interacting with Cloudmersive APIs remains the official SDKs due to their direct support and maintenance by Cloudmersive. However, developers might find community resources on platforms like GitHub or package repositories, which can offer specialized functionalities or demonstrate unique integration patterns. When considering community-contributed libraries, it is advisable to evaluate their maintenance status, documentation, and reliability, as they may not carry the same level of support or guarantee of compatibility as official offerings. The IETF's RFC 3986 on Uniform Resource Identifier (URI) Generic Syntax provides foundational context for understanding how various client libraries interact with web services.