SDKs overview

dead-drop provides Software Development Kits (SDKs) and libraries to enable developers to integrate its ephemeral secret sharing functionality directly into their applications and workflows. These tools abstract the underlying RESTful API, offering language-specific methods and objects for interacting with the dead-drop platform. SDKs simplify tasks such as creating new secrets, retrieving existing ones, and managing secret metadata programmatically, reducing the effort required for secure data exchange within development and operational pipelines.

The primary advantage of using an SDK over direct API calls is the abstraction of HTTP requests, JSON parsing, error handling, and authentication mechanisms. This allows developers to focus on the business logic of their applications rather than the intricacies of API communication. dead-drop's SDKs are designed to be idiomatic to their respective languages, aligning with common programming patterns and conventions for ease of use and maintainability.

For detailed information on the dead-drop API, including endpoint specifications and authentication methods, refer to the dead-drop API reference documentation.

Official SDKs by language

dead-drop offers official SDKs for several popular programming languages, ensuring robust and well-maintained integrations. These SDKs are developed and supported by the dead-drop team and are the recommended approach for interacting with the platform programmatically. Each SDK is designed to provide comprehensive access to dead-drop's features, including secret creation, retrieval, and management, in a language-native manner.

Official dead-drop SDKs
Language Package Name Install Command Example Maturity Level
Python deaddrop-python pip install deaddrop-python Stable
Go github.com/deaddrop/deaddrop-go go get github.com/deaddrop/deaddrop-go Stable
Node.js @deaddrop/node-sdk npm install @deaddrop/node-sdk Stable
Ruby deaddrop-ruby gem install deaddrop-ruby Beta

Each official SDK includes documentation on its specific usage, available methods, and examples. Developers are encouraged to consult the official dead-drop SDK documentation for the most up-to-date information and best practices.

Installation

Installing dead-drop SDKs typically follows the standard package management practices for each respective programming language. Below are common installation instructions for the official SDKs.

Python

The Python SDK can be installed using pip, the Python package installer. It requires Python 3.7 or newer.

pip install deaddrop-python

Go

The Go SDK is distributed as a Go module. You can add it to your project using the go get command.

go get github.com/deaddrop/deaddrop-go

After running go get, ensure your go.mod file is updated to reflect the new dependency.

Node.js

The Node.js SDK is available via npm, the Node.js package manager. It supports Node.js versions 12 and above.

npm install @deaddrop/node-sdk

Alternatively, if you are using Yarn:

yarn add @deaddrop/node-sdk

Ruby

The Ruby SDK is distributed as a RubyGems gem. It requires Ruby 2.6 or newer.

gem install deaddrop-ruby

For specific environment setup or troubleshooting, refer to the dead-drop SDK Getting Started Guide.

Quickstart example

This quickstart example demonstrates how to create and retrieve a secret using the dead-drop Python SDK. This example assumes you have installed the deaddrop-python package and have a valid dead-drop API key.


import os
from deaddrop import DeadDropClient

# Initialize the DeadDrop client with your API key
# It's recommended to load your API key from environment variables for security.
api_key = os.getenv("DEADDROP_API_KEY")
if not api_key:
    raise ValueError("DEADDROP_API_KEY environment variable not set.")

client = DeadDropClient(api_key=api_key)

try:
    # 1. Create a new secret
    secret_content = "My super sensitive data!"
    # Optional: Set a password for retrieval, a TTL, or max retrievals
    secret_options = {
        "password": "secure_password_123",
        "ttl_seconds": 3600, # Secret expires in 1 hour
        "max_retrievals": 1 # Secret can only be retrieved once
    }
    
    print("Creating a new dead-drop secret...")
    created_secret = client.create_secret(secret_content, **secret_options)
    print(f"Secret created successfully. Secret ID: {created_secret.secret_id}")
    print(f"Retrieval URL: {created_secret.retrieval_url}")

    # 2. Retrieve the secret using its ID and password
    print(f"\nAttempting to retrieve secret with ID: {created_secret.secret_id}...")
    retrieved_data = client.retrieve_secret(created_secret.secret_id, password="secure_password_123")
    
    print("Secret retrieved successfully:")
    print(f"  Content: {retrieved_data.content}")
    print(f"  Status: {retrieved_data.status}")

    # Attempting to retrieve again should fail if max_retrievals was 1
    print("\nAttempting to retrieve the secret again (should fail if max_retrievals=1)...")
    try:
        client.retrieve_secret(created_secret.secret_id, password="secure_password_123")
    except Exception as e:
        print(f"  Expected error on second retrieval: {e}")

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

This example demonstrates the basic workflow. For more advanced features, such as listing secrets (if applicable to your dead-drop plan), managing permissions, or handling different types of secrets, consult the dead-drop Python SDK Guide.

Community libraries

In addition to the official SDKs, the dead-drop community may develop and maintain libraries in other programming languages or specialized tools that interact with the dead-drop API. These community-contributed libraries can extend dead-drop's reach and provide integrations for environments not officially supported.

Community libraries are typically found on platforms like GitHub or language-specific package repositories (e.g., npm for JavaScript, PyPI for Python, RubyGems for Ruby). While these libraries can be valuable, it is important for developers to assess their maintenance status, security practices, and compatibility with the latest dead-drop API versions, as they may not receive the same level of support or updates as official SDKs.

Developers interested in contributing to or finding community-developed tools can often explore the dead-drop GitHub organization or search public repositories for deaddrop related projects. For example, developers building on the AWS ecosystem might find community projects integrating dead-drop with AWS Lambda or AWS Secrets Manager, though these would be separate from the core dead-drop offerings. Similarly, integrations with tools like Terraform or Ansible might exist as community-driven providers or modules, allowing for infrastructure-as-code management of dead-drop secrets.

When using community libraries, it is advisable to:

  • Review the source code for security vulnerabilities.
  • Check the project's activity and maintenance frequency.
  • Verify compatibility with your specific dead-drop API version.
  • Understand the licensing terms.

The dead-drop community forum and official documentation may also highlight notable community contributions or provide guidelines for developing new libraries.