Skip to main content

Object mapping library for manipulating RDF graphs that are compliant with the OpenCitations datamodel.

Project description

oc_ocdm

Run tests Coverage Documentation REUSE License: ISC PyPI version DOI

Python library for creating, manipulating, and exporting RDF data compliant with the OpenCitations Data Model. It handles OCDM entities (bibliographic resources, agents, identifiers, etc.) without requiring direct knowledge of RDF or SPARQL.

Quick start

pip install oc_ocdm
from oc_ocdm.graph import GraphSet
from oc_ocdm import Storer

g_set = GraphSet("https://w3id.org/oc/meta/")
br = g_set.add_br("https://w3id.org/oc/meta/prov/pa/1")
br.has_title("OpenCitations Meta")
br.create_journal_article()

doi = g_set.add_id("https://w3id.org/oc/meta/prov/pa/1")
doi.create_doi("10.1162/qss_a_00292")
br.has_identifier(doi)

storer = Storer(g_set)
storer.store_graphs_in_file("output.jsonld")

For guides, API reference, and examples, see the documentation.

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

oc_ocdm-11.0.20.tar.gz (765.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oc_ocdm-11.0.20-py3-none-any.whl (105.1 kB view details)

Uploaded Python 3

File details

Details for the file oc_ocdm-11.0.20.tar.gz.

File metadata

  • Download URL: oc_ocdm-11.0.20.tar.gz
  • Upload date:
  • Size: 765.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for oc_ocdm-11.0.20.tar.gz
Algorithm Hash digest
SHA256 acca47d04fa6c0d196516922b7ab8535ae4e65c1c3058ceedd0b4c4a5a96736b
MD5 ae42c0436722c5fc0c86c5bbf62a66d5
BLAKE2b-256 d7356bb98e2aa3ab8b5622502349aea993a100cff7e3a95cb8e5db3410c258f3

See more details on using hashes here.

File details

Details for the file oc_ocdm-11.0.20-py3-none-any.whl.

File metadata

  • Download URL: oc_ocdm-11.0.20-py3-none-any.whl
  • Upload date:
  • Size: 105.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for oc_ocdm-11.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 ec76017b02dbe40f4f095df7b2cecf10f52dcb2014b41b13af793b9f05233a2d
MD5 7285a8ada2b485bf09b20d22a25dc4e5
BLAKE2b-256 fce0a0f7e561edf0c6c5a4a13e2c30ce037d90a8f64925d5850718c3d183a965

See more details on using hashes here.

Supported by

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