SDKs overview
Remote Calc offers Software Development Kits (SDKs) and client libraries designed to facilitate interaction with its API. These libraries abstract away the complexities of direct HTTP communication, authentication, and response parsing, allowing developers to focus on integrating calculation functionalities into their applications using native language constructs. The Remote Calc API is a RESTful service, meaning it uses standard HTTP methods for requests and JSON for responses, a common practice in modern web services (W3C's definition of REST). Using an SDK can reduce development time and potential errors compared to making raw API calls, as the SDK handles serialization, deserialization, and error handling.
Remote Calc provides official SDKs for several popular programming languages, ensuring broad compatibility for developers. These SDKs are maintained by the Remote Calc team and are the recommended method for integrating the API. Each SDK is tailored to the idiomatic style of its respective language, providing a familiar interface for developers. Beyond official support, a community may develop additional libraries or integrations, extending the reach and utility of the Remote Calc API.
Official SDKs by language
Remote Calc provides official SDKs for the following programming languages. These libraries are developed and maintained by the Remote Calc team to ensure compatibility and provide a consistent developer experience across different environments. Each SDK simplifies common tasks such as authentication, making API requests, and processing responses for tasks like expression evaluation, unit conversion, and scientific calculations. The table below details the official SDKs, their typical package names, and installation commands.
| Language | Package Name | Installation Command | Maturity |
|---|---|---|---|
| Python | remotecalc-python |
pip install remotecalc-python |
Stable |
| JavaScript | @remotecalc/js |
npm install @remotecalc/js or yarn add @remotecalc/js |
Stable |
| Ruby | remotecalc-ruby |
gem install remotecalc-ruby |
Stable |
| Go | github.com/remotecalc/go-sdk |
go get github.com/remotecalc/go-sdk |
Stable |
Documentation for each SDK, including detailed API references and usage examples, is available on the Remote Calc documentation portal. Developers are encouraged to refer to these resources for comprehensive guidance on integrating specific functionalities.
Installation
Installing the Remote Calc SDKs typically involves using the standard package manager for each programming language. Before installation, developers should ensure they have the appropriate language runtime and package manager installed on their system. For example, Python requires pip, JavaScript requires npm or yarn, Ruby uses gem, and Go uses its built-in go get command.
Python SDK
To install the Python SDK, use pip:
pip install remotecalc-python
JavaScript SDK
For JavaScript projects, use npm or yarn:
npm install @remotecalc/js
# or
yarn add @remotecalc/js
Ruby SDK
Install the Ruby SDK using gem:
gem install remotecalc-ruby
Go SDK
To install the Go SDK, use the go get command:
go get github.com/remotecalc/go-sdk
After installation, the SDK can be imported into your project, and an API key typically needs to be configured for authentication. API keys are essential for securing access to web services and tracking usage, a common practice described in various API security guidelines (AWS API Gateway security documentation).
Quickstart example
The following quickstart examples demonstrate basic usage of the Remote Calc SDKs to evaluate a mathematical expression. These snippets illustrate the common pattern of initializing the client with an API key and then calling a method to interact with the Remote Calc API. For more detailed examples and advanced usage, refer to the official Remote Calc documentation.
Python Quickstart
import os
from remotecalc import RemoteCalcClient
# Initialize the client with your API key
# It's recommended to store your API key in an environment variable
api_key = os.environ.get("REMOTECALC_API_KEY")
client = RemoteCalcClient(api_key=api_key)
# Evaluate an expression
try:
result = client.evaluate_expression("2 + 2 * 3")
print(f"Expression: 2 + 2 * 3")
print(f"Result: {result['value']}")
except Exception as e:
print(f"Error evaluating expression: {e}")
JavaScript Quickstart (Node.js)
const RemoteCalc = require('@remotecalc/js');
// Initialize the client with your API key
// It's recommended to store your API key in an environment variable
const apiKey = process.env.REMOTECALC_API_KEY;
const client = new RemoteCalc.Client(apiKey);
// Evaluate an expression
async function evaluate() {
try {
const result = await client.evaluateExpression("10 / 2 - 1");
console.log(`Expression: 10 / 2 - 1`);
console.log(`Result: ${result.value}`);
} catch (error) {
console.error(`Error evaluating expression: ${error.message}`);
}
}
evaluate();
Ruby Quickstart
require 'remotecalc-ruby'
# Initialize the client with your API key
# It's recommended to store your API key in an environment variable
api_key = ENV['REMOTECALC_API_KEY']
client = RemoteCalc::Client.new(api_key: api_key)
# Evaluate an expression
begin
result = client.evaluate_expression('5 * (4 + 1)')
puts "Expression: 5 * (4 + 1)"
puts "Result: #{result['value']}"
rescue StandardError => e
puts "Error evaluating expression: #{e.message}"
end
Go Quickstart
package main
import (
"context"
"fmt"
"log"
"os"
remotecalc "github.com/remotecalc/go-sdk"
)
func main() {
// Initialize the client with your API key
// It's recommended to store your API key in an environment variable
apiKey := os.Getenv("REMOTECALC_API_KEY")
if apiKey == "" {
log.Fatal("REMOTECALC_API_KEY environment variable not set")
}
client := remotecalc.NewClient(apiKey)
// Evaluate an expression
expression := "(7 + 3) / 2"
ctx := context.Background()
result, err := client.EvaluateExpression(ctx, expression)
if err != nil {
log.Fatalf("Error evaluating expression: %v", err)
}
fmt.Printf("Expression: %s\n", expression)
fmt.Printf("Result: %.2f\n", result.Value)
}
These examples demonstrate the fundamental steps for integrating Remote Calc functionality into applications. Developers should replace placeholder API keys with their actual keys obtained from the Remote Calc dashboard and handle potential errors gracefully in production environments.
Community libraries
While Remote Calc provides official SDKs, the broader developer community may also contribute open-source libraries, wrappers, or integrations that extend the API's reach or offer specialized functionalities. These community-driven projects can sometimes provide alternative implementations, support for less common languages, or tools tailored for specific frameworks or use cases. Community libraries are typically hosted on platforms like GitHub and distributed through language-specific package managers.
The existence of community libraries can indicate a vibrant ecosystem around an API. However, developers should exercise due diligence when using third-party libraries: checking for active maintenance, reviewing source code for security and reliability, and understanding licensing terms. For instance, the Python Package Index (PyPI) and npm registry host numerous community packages, but their quality and support can vary (MDN Web Docs on JavaScript Promises, illustrating a common pattern in community libraries). Developers are encouraged to consult the Remote Calc community forums or GitHub repositories for any officially recognized or recommended community contributions.
As of 2026, the primary integration methods are the official SDKs. Any community-contributed libraries are typically found through public code repositories or developer communities. Developers looking for specific integrations not covered by official SDKs should explore these channels while adhering to best practices for evaluating third-party software.