SDKs overview
Final Space provides Software Development Kits (SDKs) and client libraries to facilitate interaction with its video infrastructure APIs. These tools abstract the underlying HTTP requests and authentication mechanisms, allowing developers to focus on integrating video functionalities into their applications. The SDKs are designed to streamline common tasks such as uploading videos, managing live streams, retrieving asset information, and configuring encoding settings. By offering pre-built functions and data structures, Final Space SDKs aim to reduce development time and potential errors associated with direct API calls, as detailed in the Final Space documentation.
The SDKs typically handle:
- Authentication: Managing API keys and tokens for secure access.
- Request building: Constructing API endpoints and request bodies.
- Response parsing: Interpreting API responses into native language objects.
- Error handling: Providing structured error messages for debugging.
This approach aligns with common practices in API development, where SDKs serve as a crucial layer between raw HTTP APIs and developer applications, enhancing the developer experience by simplifying complex interactions. For instance, similar principles are applied by other API providers to optimize client-side integration and reduce boilerplate code, as seen in the Google API Client Libraries.
Official SDKs by language
Final Space offers official SDKs for several popular programming languages. These libraries are maintained by Final Space and are recommended for most development projects due to their compatibility, support, and adherence to the platform's API specifications. Each SDK provides idiomatic access to the Final Space API, ensuring that developers can work within their preferred language environment effectively.
| Language | Package Name | Install Command (Example) | Maturity | Documentation Link |
|---|---|---|---|---|
| JavaScript | @finalspace/js-sdk |
npm install @finalspace/js-sdk |
Stable | Final Space JavaScript SDK Guide |
| Python | finalspace-sdk |
pip install finalspace-sdk |
Stable | Final Space Python SDK Guide |
| Ruby | finalspace-ruby |
gem install finalspace-ruby |
Stable | Final Space Ruby SDK Guide |
| PHP | finalspace/php-sdk |
composer require finalspace/php-sdk |
Stable | Final Space PHP SDK Guide |
| Go | github.com/finalspace/go-sdk |
go get github.com/finalspace/go-sdk |
Stable | Final Space Go SDK Guide |
Installation
Installing Final Space SDKs typically involves using the standard package manager for each respective language. The process is designed to be straightforward, allowing developers to quickly integrate the libraries into their projects. Below are general installation instructions for each official SDK.
JavaScript (Node.js/npm)
For JavaScript projects using Node.js, the SDK can be installed via npm (Node Package Manager) or yarn:
npm install @finalspace/js-sdk
# or
yarn add @finalspace/js-sdk
After installation, you can import the SDK into your JavaScript files:
import { FinalSpaceClient } from '@finalspace/js-sdk';
// Or for CommonJS:
// const { FinalSpaceClient } = require('@finalspace/js-sdk');
Python (pip)
Python developers can install the SDK using pip, the Python package installer:
pip install finalspace-sdk
Once installed, the SDK can be imported and utilized in Python scripts:
from finalspace_sdk import FinalSpaceClient
Ruby (RubyGems)
For Ruby applications, the SDK is available as a gem via RubyGems:
gem install finalspace-ruby
To use it in your Ruby code:
require 'finalspace-ruby'
PHP (Composer)
PHP projects typically use Composer for dependency management. Install the Final Space PHP SDK as follows:
composer require finalspace/php-sdk
Composer will automatically handle autoloading, allowing you to use the SDK classes:
require 'vendor/autoload.php';
use FinalSpace\SDK\Client;
Go (go get)
Go modules are used to manage dependencies in Go projects. Install the Go SDK:
go get github.com/finalspace/go-sdk
Then, import the package in your Go source files:
import "github.com/finalspace/go-sdk"
Quickstart example
Below is a quickstart example demonstrating how to initialize the Final Space client and upload a video using the Python SDK. This example assumes you have your Final Space API key readily available.
from finalspace_sdk import FinalSpaceClient
# Replace with your actual Final Space API key
API_KEY = "YOUR_FINAL_SPACE_API_KEY"
def upload_video(file_path, title):
client = FinalSpaceClient(api_key=API_KEY)
try:
# Upload the video file
video_asset = client.video.upload(file_path=file_path, title=title)
print(f"Video uploaded successfully! Asset ID: {video_asset['id']}")
print(f"Asset URL: {video_asset['playback_url']}")
return video_asset
except Exception as e:
print(f"Error uploading video: {e}")
return None
if __name__ == "__main__":
# Example usage: Replace 'path/to/your/video.mp4' and 'My Awesome Video' with actual values
uploaded_asset = upload_video("path/to/your/video.mp4", "My Awesome Video")
if uploaded_asset:
print("Further processing can be done with the uploaded_asset object.")
This Python quickstart illustrates the typical workflow of initializing the client with an API key and then calling a method (client.video.upload) to perform a specific action, such as uploading a video. The SDK handles the underlying API request, including authentication and parsing the response, returning a Python dictionary or object representing the video asset. Similar patterns exist across other Final Space SDKs, tailored to each language's conventions, as detailed in the Final Space API Reference.
Community libraries
While Final Space provides official SDKs, the developer community may also contribute unofficial libraries or tools that extend functionality or provide integrations with specific frameworks. These community-driven projects can offer alternative approaches or specialized features not covered by the official SDKs. For example, a community library might provide a wrapper for a specific JavaScript framework like React or Vue, simplifying component creation for video playback or management within those ecosystems.
Community libraries are typically found on platforms like GitHub or language-specific package repositories (e.g., npm, PyPI). Developers interested in using community-contributed tools should:
- Verify maintenance: Check the project's activity and recent updates.
- Review documentation: Ensure the library is well-documented.
- Examine source code: Assess the code quality and security practices, as community libraries do not carry the same official support or guarantees as the first-party SDKs.
- Check for compatibility: Confirm compatibility with the current Final Space API version.
As of late 2026, Final Space's official SDKs cover the primary use cases and languages, so the need for extensive third-party libraries for core API interactions is reduced. However, community contributions often emerge for specific niche integrations or higher-level abstractions. Developers are encouraged to consult the Final Space API topic on GitHub for potential community projects and examples, or search repositories like npm for Final Space packages to discover community-driven efforts.