python library for querying and verifying funding.json
Project description
Funding JSON for Python
Python library for parsing, verifying and validating https://fundingjson.org manifests.
Examples
Fetch funding.json from the web and do a full verification.
import funding_json
try:
manifest = funding_json.fetch("https://example.com/funding.json", verify_urls=True)
print(manifest.entity.name)
except Exception as e:
print(f"fetching failed: {e}")
This will also retreive values for wellKnown web-links and verify that the
back-links are correct. To skip that step you can set verify_urls=False.
Load funding json from disk, then run verification:
import funding_json
try:
# load manifest from file system
manifest = funding_json.load(".../local/funding.json")
# run basic validation checks on well-known urls
funding_json.validate_well_known_urls("https://example.com/funding.json", manifest)
# verify link ownership by downloading and checking well-known back-links from the web
funding_json.verify_well_known_urls("https://example.com/funding.json", manifest)
except AssertionError as e:
print(f"verificated failed: {e}")
developer notes
run linters, unit tests, etc.:
tools/check
test fetching, validating and verifying some live funding.json files:
tools/integration-test.py
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 funding_json-0.1.tar.gz.
File metadata
- Download URL: funding_json-0.1.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.12.27+bpo-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70a4ec4acae28b7c123b40a301a3e6d3f30859052c337ef342771c2a6eee09e9
|
|
| MD5 |
2e13ebab116542dab52e9a390aa13d11
|
|
| BLAKE2b-256 |
3d1a870e7aa7f179c58fba76e4f6617af983f37b143786da157b35ef27b9e7af
|
File details
Details for the file funding_json-0.1-py3-none-any.whl.
File metadata
- Download URL: funding_json-0.1-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.12.27+bpo-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68bf1b4e047e17d29adee5888895e3c3db5f6091e697261fbe9401619c595f76
|
|
| MD5 |
744a36e65f17acfe10376f397eb6d8a6
|
|
| BLAKE2b-256 |
5f2f24ae7895a4c831fbe10a5941ef84c753d6714c0cd1c201a1322f1e318c55
|