Skip to main content

scrift

License: MIT

Python SDK for the Scrift brand asset API. Fetch brand colours, SVG logos, raster exports, and metadata for thousands of companies - one API call at a time.

Installation

pip install scrift

Quick start

from scrift import Scrift

with Scrift(api_key="scrf_...") as client:
    # Look up a single brand
    brand = client.catalog.get("stripe")
    print(brand.name, brand.brand_color)  # Stripe 635BFF
    print(brand.rate_limit)  # RateLimitInfo from X-RateLimit-* headers (or None)

    # List the catalog
    page = client.catalog.list(limit=10)
    for item in page.items:
        print(item.slug)

    # Batch lookup (up to 50 slugs)
    batch = client.catalog.batch(["stripe", "github", "vercel"])
    print(batch.found, batch.not_found)

    # Search by name
    results = client.catalog.search("stripe")
    for match in results.matches:
        print(match.slug, match.name)

    # Fetch an SVG logo
    svg_bytes = client.svg.get("stripe", variant="dark")

    # PNG / WebP (size is an API-defined enum, e.g. 32 … 512)
    png_bytes = client.raster.get_png("stripe", size=128, variant="mono")
    webp_bytes = client.raster.get_webp("stripe", size=256)

    # Look up a brand by domain
    info = client.brand.get("stripe.com")
    print(info.variants)  # ['color', 'mono', 'wordmark']

Method reference

Method Description
client.catalog.get(slug) Single brand by slug
client.catalog.list(limit=, offset=) Paginated catalog list
client.catalog.batch(slugs) Batch lookup (max 50)
client.catalog.search(query, limit=) Search by name (min 2 chars)
client.svg.get(slug, variant=) Raw SVG bytes
client.raster.get_png(slug, size=, variant=) Raw PNG bytes
client.raster.get_webp(slug, size=, variant=) Raw WebP bytes
client.brand.get(domain) Brand lookup by domain

SVG variants

mono, color, dark, light, wordmark, icon

Error handling

from scrift import Scrift, NotFoundError, RateLimitError

with Scrift(api_key="scrf_...") as client:
    try:
        brand = client.catalog.get("nonexistent")
    except NotFoundError as e:
        print(e.error_code)  # service_not_found
    except RateLimitError as e:
        print(f"Retry after {e.retry_after}s")

All exceptions inherit from ScriftError and carry status_code, error_code, and message.

Exception HTTP status
AuthenticationError 401
NotFoundError 404
ValidationError 422
RateLimitError (ScriftRateLimitError) 429 (auto-retries once, capped at 30s)
APIError everything else

License

MIT

Metadata

Release files for scrift 0.2.3

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

Source distribution (sdist)

Source distribution for scrift 0.2.3
File Size Uploaded Provenance Actions
scrift-0.2.3.tar.gz 18.4 kB Without provenance Details for scrift-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scrift 0.2.3
File Interpreter ABI Platform Actions
scrift-0.2.3-py3-none-any.whl Python 3 none any Details for scrift-0.2.3-py3-none-any.whl

Total release size: 30.6 kB

Release files / scrift-0.2.3.tar.gz

Download URL scrift-0.2.3.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2282ddc4428bd0b2fb6734241b19e6e9048b9fe8c69058ac620a69c648caddfc
BLAKE2b-256 checksum
How to use checksums
9fcfb0c9a62816bb95ff4eec69120f46fc8909ed48ddc1d041c8af542e23f3f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / scrift-0.2.3-py3-none-any.whl

Download URL scrift-0.2.3-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d704ce512e94d30661cba3dbbbdf38d4a2ac65beb92713394f0068beb9161a45
BLAKE2b-256 checksum
How to use checksums
6cf788da62f0a1a3366b328164755d0a72815fc83f0093ac372fd53c3c70eb04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for scrift 0.2.3

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.

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