Helper functions for the generation of CIDOC CRMish RDF
Project description
acdh-cidoc-pyutils
Helper functions for the generation of CIDOC CRMish RDF
Usage
- install via
pip install acdh-cidoc-pyutils
date-like-string to casted rdflib.Literal
from acdh_cidoc_pyutils import date_to_literal
dates = [
"1900",
"1900-01",
"1901-01-01",
"foo",
]
for x in dates:
date_literal = date_to_literal(x)
print((date_literal.datatype))
# returns
# http://www.w3.org/2001/XMLSchema#gYear
# http://www.w3.org/2001/XMLSchema#gYearMonth
# http://www.w3.org/2001/XMLSchema#date
# http://www.w3.org/2001/XMLSchema#string
development
pip install -r requirements_dev.txt
flake8
-> lintingcoveage run -m pytest
-> runs tests and creates coverage stats
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 acdh_cidoc_pyutils-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0556d22e09aa83d623011ef7ea454f54270221945059ca8e18f3a8ad98005629 |
|
MD5 | 5619bdf9739b891a0519dc91af2afe0f |
|
BLAKE2b-256 | 9aa9783bd429ed37052c1b02e9f4e5a893add5807c43c498ed0e835a4e9557de |