Skip to main content

Draggit SDK

Professional PDF watermarking service for Python applications.

Features

✅ Easy Integration - Simple Python API ✅ Free/Paid Tiers - Free keys get a watermarked PDF, paid keys get a clean one - no code change needed to switch, just swap your api_key ✅ License Tracking - Built-in usage monitoring ✅ Secure - API key authentication ✅ Black Box - No code modification possible

Installation

pip install draggit-sdk

Quick Start

from draggit import DraggitClient

# Initialize client
client = DraggitClient(api_key="your-api-key")

# Watermark PDF (see "DSC Digital Signatures" below before you apply
# your own certificate signature - order matters!)
result = client.sign_and_save(
    input_pdf="document.pdf",
    output_pdf="document_signed.pdf"
)

print(f"Signed! Used {result['signatures_used']} signatures")

Naming note: despite the method name, sign_and_save() only adds the Draggit watermark/logo - it never performs cryptographic signing or touches a certificate/private key. See DSC Digital Signatures below.

Usage

Basic Signing

client = DraggitClient(api_key="demo-key")

# Sign and save
result = client.sign_and_save("input.pdf", "output.pdf")
# Returns: {
#   'status': 'success',
#   'message': 'PDF signed successfully with Draggit watermarks',
#   'tier': 'free',
#   'signatures_used': 1,
#   'output_file': 'output.pdf',
#   'file_size': 28136
# }

Check License

# Validate API key
is_valid, info = client.validate_license()

if is_valid:
    print(f"Valid! Remaining: {info['signatures_remaining']}")
else:
    print("Invalid or expired API key")

# Get detailed info
license_info = client.get_license_info()
print(f"Tier: {license_info['license_type']}")
print(f"Used: {license_info['signatures_used']}/{license_info['signatures_limit']}")

DSC Digital Signatures

Draggit never touches your certificate, private key, or performs cryptographic signing - that always happens with your own DSC tool (USB token, emSigner, Aadhaar eSign, etc.). Draggit only prepares the PDF's visible watermark and logo.

Correct order: watermark first, sign last.

1. You have a raw, UNSIGNED PDF
2. client.sign_and_save(raw_pdf, watermarked_pdf)   <- Draggit step
3. You sign `watermarked_pdf` with your own DSC tool <- your step, LAST
4. Final PDF: watermarked AND validly signed

This order matters because a digital signature is a cryptographic hash of the exact file bytes at signing time. If you watermark a PDF after it's already signed, the signature becomes invalid ("document modified after signing") in any PDF viewer. Always send Draggit the unsigned PDF, and sign the watermarked output it returns - never the other way around.

The signature field follows automatically, on every tier. If your PDF already has a signature field (from a form template or your DSC tool), Draggit's output keeps a field in exactly that box on that page. If it doesn't, Draggit creates an empty signature field placeholder at a default position - so your DSC tool will find a real field to sign into either way, without you needing to pass any coordinates. On the free tier, a "Draggit Signed" logo is also drawn there; on a paid key, the field is created but nothing is drawn on top of it.

API Keys

  • demo-key - free tier, 100 signatures, watermarked output.
  • Paid keys are issued individually per customer and return watermark-free output - contact support@draggit.com to get one. Swapping api_key is the only code change needed to go from watermarked to clean.

First request may be slow: the hosted API runs on a free-tier instance that spins down after inactivity. If it's been idle, DraggitClient(...) can take up to ~60 seconds to connect while it wakes back up - this is normal, not an error. Subsequent requests are fast until it goes idle again.

Error Handling

from draggit import DraggitClient

try:
    client = DraggitClient(api_key="invalid-key")
except ConnectionError as e:
    print(f"Connection error: {e}")

try:
    result = client.sign_and_save("nonexistent.pdf", "output.pdf")
except FileNotFoundError as e:
    print(f"File error: {e}")
except ValueError as e:
    print(f"API error: {e}")

What This SDK Does

✅ Adds a "draggit" watermark + logo signature to free-tier PDFs; removes both for a paid key ✅ Detects (or creates) a signature field so your DSC tool has somewhere to sign, on every tier ✅ License-based usage tracking ✅ Simple Python API

What This SDK Does NOT Do

❌ Cryptographic DSC signing with a certificate/private key - that's always done with your own DSC tool, and always after calling Draggit (see DSC Digital Signatures) ❌ Code modification (black box - no source code access) ❌ Decompilation possible

Support

For support, contact: support@draggit.com

License

Proprietary - See LICENSE file

Metadata

Release files for draggit-sdk 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for draggit-sdk 2.0.0
File Size Uploaded Provenance Actions
draggit_sdk-2.0.0.tar.gz 6.7 kB Without provenance Details for draggit_sdk-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for draggit-sdk 2.0.0
File Interpreter ABI Platform Actions
draggit_sdk-2.0.0-py3-none-any.whl Python 3 none any Details for draggit_sdk-2.0.0-py3-none-any.whl

Total release size: 13.5 kB

Release files / draggit_sdk-2.0.0.tar.gz

Download URL draggit_sdk-2.0.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
00b6bad9ef1e60632c4d764cad82826589e0705c70579458c165ecd61cadbdca
BLAKE2b-256 checksum
How to use checksums
1b3d20edc0cd8b93985ba765571bb15e0a3b7575afdfbe26c8e63c901232147e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / draggit_sdk-2.0.0-py3-none-any.whl

Download URL draggit_sdk-2.0.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f07c09a73fb99baa8c897b89d89f3b5134e2adf63137b79ddebe94f74814c79
BLAKE2b-256 checksum
How to use checksums
f70b47e102619c633a81ca595b4ec68d06e0873265dc7bb63450656b9c333ad0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for draggit-sdk 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page