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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22cc1a33b41829f6f6c8fbd05404c71abf2043535f037a01ee35c5b9c43e5c17
|
|
| MD5 |
6544354e18de5afde2a123c2ba3e7c04
|
|
| BLAKE2b-256 |
ecbc4d439977258cedc56ac01a7270b839d75c47b22183495cd05d56ba6de651
|
Provenance
The following attestation bundles were made for etag_generator-0.9.1.tar.gz:
Publisher:
build.yaml on paulprogrammer/py-json-etag-generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
etag_generator-0.9.1.tar.gz -
Subject digest:
22cc1a33b41829f6f6c8fbd05404c71abf2043535f037a01ee35c5b9c43e5c17 - Sigstore transparency entry: 183905256
- Sigstore integration time:
-
Permalink:
paulprogrammer/py-json-etag-generator@9f8cc491d21fd8736f8fba9b8d27c5f7aefd85fb -
Branch / Tag:
refs/tags/v0.9.1 - Owner: https://github.com/paulprogrammer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yaml@9f8cc491d21fd8736f8fba9b8d27c5f7aefd85fb -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de0a5b7f9782bed2fc753a48ae14a529e241f292d7e4d70308ea99721dc31eaa
|
|
| MD5 |
68724581a1bf6ebf4255ff600ef8dc06
|
|
| BLAKE2b-256 |
237305b966a6a1bdac053fcd0ef5cf5fe8ede2a54d35e5afb630175434eb8c10
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
etag_generator-0.9.1-py3-none-any.whl -
Subject digest:
de0a5b7f9782bed2fc753a48ae14a529e241f292d7e4d70308ea99721dc31eaa - Sigstore transparency entry: 183905258
- Sigstore integration time:
-
Permalink:
paulprogrammer/py-json-etag-generator@9f8cc491d21fd8736f8fba9b8d27c5f7aefd85fb -
Branch / Tag:
refs/tags/v0.9.1 - Owner: https://github.com/paulprogrammer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yaml@9f8cc491d21fd8736f8fba9b8d27c5f7aefd85fb -
Trigger Event:
release
-
Statement type: