Skip to main content

Helper functions for the generation of CIDOC CRMish RDF

Project description

flake8 Lint Test codecov

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 -> linting
  • coveage run -m pytest -> runs tests and creates coverage stats

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

acdh_cidoc_pyutils-0.1.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

acdh_cidoc_pyutils-0.1.1-py3-none-any.whl (3.3 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