Skip to main content

FP-Devicer

Developed by Gateway Corporate Solutions LLC

FP-Devicer is a digital fingerprinting middleware library designed for ease of use and near-universal compatibility with servers.

Usage

Importing and using the library to compare fingerprints between users is as simple as collecting user data and running a confidence calculation.

# 1. Simple method (using defaults)
from devicer import calculate_confidence

score = calculate_confidence(fp_data_1, fp_data_2)

# 2. Advanced method (custom weights & comparators)
from devicer import ComparisonOptions, create_confidence_calculator, register_plugin
from devicer.libs.comparators import levenshtein_similarity

register_plugin(
  "userAgent",
  weight=25,
  comparator=lambda a, b, _path=None: levenshtein_similarity(
    str(a or "").lower(),
    str(b or "").lower(),
  ),
)

advanced_calculator = create_confidence_calculator(
  ComparisonOptions(
    weights={
      "platform": 20,
      "fonts": 20,
      "screen": 15,
    },
  )
)

advanced_score = advanced_calculator.calculate_confidence(fp_data_1, fp_data_2)

For storage-backed identification flows:

import asyncio
from devicer import DeviceManager, create_in_memory_adapter


async def main() -> None:
  adapter = create_in_memory_adapter()
  await adapter.init()
  manager = DeviceManager(adapter)

  result = await manager.identify(
    {
      "userAgent": "Mozilla/5.0",
      "platform": "Linux x86_64",
      "languages": ["en-US", "en"],
    },
    user_id="user-1",
    ip="127.0.0.1",
  )
  print(result)  # -> IdentifyResult(device_id=..., confidence=..., is_new_device=...)


asyncio.run(main())

The resulting confidence ranges between 0 and 100, where 100 is the strongest match.

Quickstart

Install and run the Python package:

pip install devicer.py
python -c "from devicer import calculate_confidence; print(calculate_confidence({'platform':'Win32'},{'platform':'Win32'}))"

For local development:

pip install -e .[dev]
pytest -q

Adapters

Built-in adapters:

  • create_in_memory_adapter()
  • create_sqlite_adapter(path)
  • create_postgres_adapter(dsn) (requires optional postgres extras)
  • create_redis_adapter(url) (requires optional redis extras)

Install optional adapter dependencies:

pip install -e .[postgres]
pip install -e .[redis]

Benchmarks

You can run benchmark parity scripts for performance and accuracy:

python -m devicer.benchmarks.performance_bench
python -m devicer.benchmarks.accuracy_bench

Outputs are written to:

  • src/devicer/benchmarks/performance.bench.out
  • src/devicer/benchmarks/accuracy.bench.out

Documentation

The TypeScript SDK documentation is available at gatewaycorporate.github.io/fp-devicer. The Python package mirrors the same core architecture (core, libs, benchmarks, and types) with Pythonic APIs.

Whitepaper

The whitepaper covers the theory, architecture, and design decisions behind FP-Devicer. You can read it here.

Metadata

Release files for devicer.py 1.5.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 devicer.py 1.5.0
File Size Uploaded
devicer_py-1.5.0.tar.gz 24.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for devicer.py 1.5.0
File Interpreter ABI Platform
devicer_py-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 55.9 kB

Release files / devicer_py-1.5.0.tar.gz

Download URL devicer_py-1.5.0.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
14327a183deebe1cd817d501ae58c533504a974cb5f458f19b22c66430ee387e
BLAKE2b-256 checksum
How to use checksums
3416d5c447d70813f196062bf1f30e2ff39a7cd6e5ceeaea94dbfd73af8242f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.

Transparency log

Release files / devicer_py-1.5.0-py3-none-any.whl

Download URL devicer_py-1.5.0-py3-none-any.whl
Size 31.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a381e9ea416048cce07d838dcbebb69bff7c18c02123ee6740e50b41c914dedd
BLAKE2b-256 checksum
How to use checksums
e00e95ec3d515167b868b0241676c159b0570c4af73a6c84a4c858db04ffaa21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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