Skip to main content

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


Download files

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

Source Distribution

kraken-schema-org-0.0.22.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

kraken_schema_org-0.0.22-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page