Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 4.5.16 instead.
Reason given by maintainers: does not import, the owid dependency was not included, fixed in 4.5.13

fiftyone_pipeline_did

Strongly typed Python reader for the 51Did (51Degrees Identifier) returned by the 51Degrees Cloud service. Mirrors the .NET FiftyOne.Did package.

Terminology

  • The 51Did (51Degrees Identifier) is the identifier as a whole.
  • The envelope is the data model that carries it: a signed OWID holding the version, domain, date, payload and signature. It changes byte-for-byte every time the cloud issues one.
  • The value is the stable, comparable part of the payload after the Flags and License Id: a 32-byte SHA-256 for Probabilistic and HashedEmail identifiers, or 16 GUID bytes for Random.

Comparing two 51Dids means comparing their values, never their envelopes.

Payload layout

Offset Length Field Type
0 1 Flags uint8: bits 0-2 usage, bits 6-7 identifier type
1 4 LicenseId uint32 (little-endian)
5 16/32 Value SHA-256 (Probabilistic, HashedEmail) or GUID (Random)
Bits 7-6 IdType Value length Minimum payload
00 PROBABILISTIC 32 37
01 RANDOM 16 21
10 HASHED_EMAIL 32 37
11 RESERVED remainder 5

Identifiers issued before the type tag existed have bits 6-7 zeroed and decode as PROBABILISTIC.

OWID dependency

FodId builds on the OWID envelope library (SWAN-community/owid-python, package owid), consumed via the 51Degrees/owid-python fork (git submodule; switch to upstream once published). Owid is composed, not subclassed: FodId holds an Owid and delegates OWID-level concerns to it.

Usage

from fiftyone_pipeline_did import FodId, IdType

fod_id = FodId.from_base64(base64_from_cloud_service)

flags = fod_id.flags
type_ = fod_id.type          # IdType.PROBABILISTIC / RANDOM / HASHED_EMAIL
license_id = fod_id.license_id
value = fod_id.hash          # SHA-256 or GUID bytes, see type

# Delegated OWID-level fields and operations.
domain = fod_id.domain
verified = fod_id.verify(public_key_pem)
base64 = fod_id.as_base64()

Comparing two 51Dids

a = FodId.from_base64(idprobglobal_a)
b = FodId.from_base64(idprobglobal_b)

# The envelope (date, signature, base64) differs across reissues.
# The value inside the payload is stable - this is what you compare:
same_value = a.hash == b.hash

Non-goals

  • No signature verification on construction. Call verify(public_key_pem) when needed.
  • No creation of new 51Dids. This is a parser; new 51Dids are issued by the 51Degrees cloud / on-premise hashing engines.

Download files

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

Source Distribution

fiftyone_pipeline_did-4.5.10.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

fiftyone_pipeline_did-4.5.10-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file fiftyone_pipeline_did-4.5.10.tar.gz.

File metadata

  • Download URL: fiftyone_pipeline_did-4.5.10.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for fiftyone_pipeline_did-4.5.10.tar.gz
Algorithm Hash digest
SHA256 80ee435aa8233ed5e86be3aae3c4a74ce44d8abe48021b6a040300ccb7c3ed13
MD5 acc481590d07ede93e387c2c7d5291ae
BLAKE2b-256 92cd95dbfee829df375eb05a0d4212e2d4ddb9ffb87124594a15754371f34e19

See more details on using hashes here.

File details

Details for the file fiftyone_pipeline_did-4.5.10-py3-none-any.whl.

File metadata

File hashes

Hashes for fiftyone_pipeline_did-4.5.10-py3-none-any.whl
Algorithm Hash digest
SHA256 c59723d124e350970947cee521d3f96b4d6c5b5195b581d2acdf07d60a50ac80
MD5 e75efce07efcb57e27a0198d1dcf4d6a
BLAKE2b-256 6d80b6b60537902c485842362b535b46d55bdef9158f0806c276396d9eecbfce

See more details on using hashes here.

Release history Release notifications | RSS feed

4.5.16

2 files

4.5.15

2 files

4.5.14

2 files

4.5.13

2 files

4.5.12

2 files

4.5.11

2 files

This release

4.5.10 This release

2 files

4.5.9

2 files

4.5.8

2 files

4.5.7

2 files

4.5.6

2 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