Skip to main content

Python client for the SignupCheck anti-abuse API

Project description

signupcheck-sdk

Python client for the SignupCheck anti-abuse API — block disposable emails, VPNs, proxies, bots, and malicious IPs at signup.

Install

pip install signupcheck-sdk

Requires Python 3.9+.

Quick start

import os
import signupcheck
from signupcheck.models.evaluate_signup_request import EvaluateSignupRequest

cfg = signupcheck.Configuration()  # defaults to https://signupcheck.com
# or explicitly: cfg = signupcheck.Configuration(host="https://signupcheck.com")
cfg.api_key["API Key"] = os.environ["SIGNUPCHECK_API_KEY"]

with signupcheck.ApiClient(cfg) as client:
    api = signupcheck.DecisionEngineApi(client)
    resp = api.evaluate_signup(EvaluateSignupRequest(
        email="user@example.com",
        ip="1.2.3.4",
    ))
    print(resp.decision, resp.risk_score)

The client reads the API key via the X-API-Key header. To use Bearer auth instead:

cfg.api_key["Bearer"] = os.environ["SIGNUPCHECK_API_KEY"]
cfg.api_key_prefix["Bearer"] = "Bearer"

Available APIs

Class Endpoint prefix Purpose
DecisionEngineApi /v1/evaluate/signup ALLOW / CHALLENGE / BLOCK decision
ChecksApi /v1/evaluate/{email,ip} Standalone email / IP risk checks
ListsApi /v1/lists Manage allow / block lists
RulesApi /v1/rules Manage custom rules
FeedbackApi /v1/feedback/signup Submit outcome feedback
ObservabilityApi /v1/events, /v1/metrics/signup Query events and metrics
AccountApi /v1/me Validate API key (no credit charge)

Development

This package is generated from the OpenAPI spec in the signupcheck API repo. To regenerate after a schema change, run make sdk-python in the API repo.

Important for generation: Ensure the OpenAPI spec declares the production server as https://signupcheck.com (the SDK default). The generator templates default to http://localhost:8000 when no servers are defined in the spec. After generation, verify that py/signupcheck/configuration.py and ts/src/runtime.ts contain the correct default.

Local build and test from this directory:

make build      # python -m build → dist/
make check      # twine check dist/*

License

Proprietary. See the repository for terms.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

signupcheck_sdk-0.1.4.tar.gz (64.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

signupcheck_sdk-0.1.4-py3-none-any.whl (173.4 kB view details)

Uploaded Python 3

File details

Details for the file signupcheck_sdk-0.1.4.tar.gz.

File metadata

  • Download URL: signupcheck_sdk-0.1.4.tar.gz
  • Upload date:
  • Size: 64.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for signupcheck_sdk-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d1e92edf53510d083c17ef016b7d38d8e7b80c7d12573ecdde07f380f4d0651e
MD5 60d4b5219a6f34ce7860e3c0d9323948
BLAKE2b-256 63023396a22d0b42314c66ad056b86fe49db3ea3712ae536906b83413101c236

See more details on using hashes here.

File details

Details for the file signupcheck_sdk-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for signupcheck_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 14b9e12b8bf5a8310a2d7f4d60fbb5ab3ec1768736662228773b7f6aac1e85e2
MD5 86fcd77f676e0fb105a93b70daaf4f2b
BLAKE2b-256 9399e074726ecbae0a74a574c8dd7249161406cfe9f97006554517e638eb4086

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page