Kraken schema.org
Project description
Library to schema_org
Provides functions to normalize @type, keys/attributes and values following schema.org notation
How to use:
from kraken_schema_org import kraken_schema_org as k
Normalize @type
record_type = 'person'
normalized_type = k.normalize_type(record_type)
Normalize key/attribute
key = 'givenname'
normalized_key = k.normalize_key(key)
Normalize value or record
record = {"@type": "schema:WebPage", "schema:url": "https://www.test.com"}
normalized_record = k.normalize_record(record)
normalized_value = k.normalize_value(record_type: str, key: str, value: xx, strict: bool)
Get keys/attributes for a given @type
record_type = 'person'
keys = k.get_keys(record_type)
Get Datatypes for a given key
record_type = 'schema:Person'
key = 'schema:givenName'
datatypes = k.get_datatype(record_type, key)
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
Close
Hashes for kraken_schema_org-0.0.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a791b2ec7bfc70685b1a4fd28d5482253eee68f3f8c359d7559327e57c3cf99 |
|
MD5 | 79ea967dc506b579030a6ff019dcc5c3 |
|
BLAKE2b-256 | 7b20136b1d2008ec891370480680820997a63c744eae2a7b0911e1556e490fd1 |