Skip to main content

Given a JSON object (python dict), generate a stable value suitable as an ETag

Project description

etag_generator

Given a python list or dictionary that will represents a JSON return value, generate an ETag that is guaranteed to be stable.

Will generate an etag from most data commonly used types:

  • dict
  • list
  • string
  • int / float

Works to create stable identifiers even with complex, multi-level objects.

Does not have the smarts to handle circular references.

Currently doesn't deal with the following data types:

  • tuple
  • classes
  • boolean
  • none
  • other stuff that might exist that isn't in the supported list

installation

pip install etag_generator

usage

from etag_generator import generate_etag

etag = generate_etag({"any_object":"value"})

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

etag_generator-0.9.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

etag_generator-0.9.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file etag_generator-0.9.1.tar.gz.

File metadata

  • Download URL: etag_generator-0.9.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for etag_generator-0.9.1.tar.gz
Algorithm Hash digest
SHA256 22cc1a33b41829f6f6c8fbd05404c71abf2043535f037a01ee35c5b9c43e5c17
MD5 6544354e18de5afde2a123c2ba3e7c04
BLAKE2b-256 ecbc4d439977258cedc56ac01a7270b839d75c47b22183495cd05d56ba6de651

See more details on using hashes here.

Provenance

The following attestation bundles were made for etag_generator-0.9.1.tar.gz:

Publisher: build.yaml on paulprogrammer/py-json-etag-generator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file etag_generator-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: etag_generator-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for etag_generator-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de0a5b7f9782bed2fc753a48ae14a529e241f292d7e4d70308ea99721dc31eaa
MD5 68724581a1bf6ebf4255ff600ef8dc06
BLAKE2b-256 237305b966a6a1bdac053fcd0ef5cf5fe8ede2a54d35e5afb630175434eb8c10

See more details on using hashes here.

Provenance

The following attestation bundles were made for etag_generator-0.9.1-py3-none-any.whl:

Publisher: build.yaml on paulprogrammer/py-json-etag-generator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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