Skip to main content

Snapshot Site Python SDK

PyPI Python License CI

Official Python SDK for the Snapshot Site API.

Install

pip install snapshot-site-sdk

Create your API token in Snapshot Site Console:

Usage

from snapshot_site import SnapshotSiteClient

client = SnapshotSiteClient(api_key="ss_live_xxx")

result = client.screenshot({
    "url": "https://snapshot-site.com",
    "format": "png",
    "fullSize": True,
})

print(result.get("link"))

Screenshot example

from snapshot_site import SnapshotSiteClient

client = SnapshotSiteClient(api_key="ss_live_xxx")

result = client.screenshot({
    "url": "https://snapshot-site.com/pricing",
    "width": 1440,
    "format": "png",
    "fullSize": True,
    "hideCookie": True,
})

print(result)

Analyze example

from snapshot_site import SnapshotSiteClient

client = SnapshotSiteClient(api_key="ss_live_xxx")

result = client.analyze({
    "url": "https://snapshot-site.com",
    "width": 1440,
    "fullSize": True,
    "enableSummary": True,
    "enableQuality": True,
})

print(result)

Compare example

from snapshot_site import SnapshotSiteClient

client = SnapshotSiteClient(api_key="ss_live_xxx")

result = client.compare({
    "before": {
        "url": "https://snapshot-site.com/pricing",
        "width": 1440,
        "fullSize": True,
        "hideCookie": True,
    },
    "after": {
        "url": "https://staging.snapshot-site.com/pricing",
        "width": 1440,
        "fullSize": True,
        "hideCookie": True,
    },
    "threshold": 0.1,
})

print(result)

Download assets locally

from snapshot_site import SnapshotSiteClient

client = SnapshotSiteClient(api_key="ss_live_xxx")

result = client.screenshot({
    "url": "https://snapshot-site.com/pricing",
    "format": "png",
    "fullSize": True,
})

client.download_to(result, "pricing.png")

Custom base URL

client = SnapshotSiteClient(
    api_key="ss_live_xxx",
    base_url="https://api.prod.ss.snapshot-site.com",
)

Tests

python -m pip install -e .[dev]
pytest

Build for PyPI

python -m pip install -e .[dev]
python -m build

Release files for snapshot-site-sdk 0.1.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 snapshot-site-sdk 0.1.0
File Size Uploaded
snapshot_site_sdk-0.1.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snapshot-site-sdk 0.1.0
File Interpreter ABI Platform
snapshot_site_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / snapshot_site_sdk-0.1.0.tar.gz

Download URL snapshot_site_sdk-0.1.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a95b5c7de8099c89b062dff031bd7163211ad772cd034eeea07a7545a6e9a138
BLAKE2b-256 checksum
How to use checksums
7b2caac6ab76d06f261aa28ae90d4e29968d93cb1d4ff597a434f349a597cc39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.4

Release files / snapshot_site_sdk-0.1.0-py3-none-any.whl

Download URL snapshot_site_sdk-0.1.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2f6cbcf75fe1b3378c58c9983141cfa749025ee49eacc8e7859cb38dd219d02
BLAKE2b-256 checksum
How to use checksums
b9410a2a160fc6993b185d00ce92365f55ef480f569f93218fa97f48bf8369c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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