Skip to main content

Official Python SDK for FingerprintIQ — visitor identification, API caller classification, and CLI usage analytics

Project description

fingerprintiq

Official Python SDK for FingerprintIQ — three products in one package:

  • Identify — server-side visitor lookup
  • Sentinel — classify API callers as browsers, AI agents, CLI tools, or bots
  • Pulse — CLI usage analytics and machine fingerprinting

Installation

pip install fingerprintiq              # core (Identify + Sentinel + Pulse)
pip install 'fingerprintiq[fastapi]'   # + FastAPI / Starlette middleware

Requires Python 3.9+.

Identify — server-side visitor lookup

from fingerprintiq import FingerprintIQ

with FingerprintIQ(api_key="fiq_live_...") as client:
    visitor = client.lookup(visitor_id="iq_abc123")
    print(visitor.visitor_id, visitor.bot_probability)

Async variant:

import asyncio
from fingerprintiq import FingerprintIQ

async def main() -> None:
    client = FingerprintIQ(api_key="fiq_live_...")
    try:
        visitor = await client.alookup(visitor_id="iq_abc123")
        print(visitor.bot_probability)
    finally:
        await client.aclose()

asyncio.run(main())

Sentinel — FastAPI middleware

from fastapi import FastAPI, Request
from fingerprintiq.sentinel.fastapi import SentinelMiddleware

app = FastAPI()
app.add_middleware(SentinelMiddleware, api_key="fiq_live_...")

@app.get("/api/data")
def handler(request: Request):
    result = request.state.sentinel  # SentinelResult | None
    if result and result.caller_type == "bot":
        return {"blocked": True}
    return {"ok": True}

Pulse — CLI analytics

from fingerprintiq.pulse import Pulse

pulse = Pulse(api_key="fiq_live_...", tool="my-cli", version="1.2.3")
pulse.track("deploy", metadata={"duration_ms": 1234, "success": True})
pulse.shutdown()  # or let atexit handle it

Honors DO_NOT_TRACK=1 and FINGERPRINTIQ_OPTOUT=1 out of the box. Set respect_opt_out=False to override.

Links

License

MIT

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

fingerprintiq-0.1.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

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

fingerprintiq-0.1.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file fingerprintiq-0.1.0.tar.gz.

File metadata

  • Download URL: fingerprintiq-0.1.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fingerprintiq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 409dc8cc6f5721f70cc3135efc6c9a6f9dcbbe70ae41c1ec01f666a8d08c6678
MD5 5b0d92bf01f13e587adfc4fa6c6b0b2f
BLAKE2b-256 4c970bed9f6353723e6f52e8630dce68403d3be03562f83d91f77acb25734d3d

See more details on using hashes here.

File details

Details for the file fingerprintiq-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fingerprintiq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fingerprintiq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f874ca1783765705c0f1f5cbbf0ca00715e3478bda4e090762470936db956a1
MD5 f119e33ab286c44f6268ec55723549d3
BLAKE2b-256 61159ff8c6afe822161fb989da806d07a213a71845e6c91a57dc6575dfa7ff97

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