Skip to main content

python tool for working with ontologies and data models

Project description

logo

tools4RDF is a Python toolkit for working with RDF data, SPARQL queries, and semantic networks.

It allows one or more ontologies to be parsed and represented as Python classes, making it easier to navigate and explore their structure through features like autocompletion in interactive environments such as Jupyter notebooks.

The aim is to make querying knowledge graphs with SPARQL more accessible to users without deep expertise in semantic web technologies.


🚀 Features

  • Load and serialize RDF graphs (Turtle, RDF/XML, N-Triples, etc.)
  • Compose and run SPARQL queries programmatically
  • Auto-discover ontology terms via dot-access
  • Query graphs and return results as pandas DataFrames
  • Perform graph merging and basic path reasoning

📦 Installation

pip install tools4rdf

Or:

conda install -c conda-forge tools4rdf

📘 Example

from tools4rdf import OntologyNetwork
onto = OntologyNetwork('http://xmlns.com/foaf/0.1/')
df = onto.query(
    'https://dbpedia.org/sparql',
    onto.terms.foaf.Person,
    onto.terms.foaf.familyName,
    limit=10,
)

More examples available in the docs.


📄 License

MIT License


🤝 Contributing

Issues and pull requests are welcome! Feel free to suggest new utilities or improvements.

📌 Acknowledgement

This work is supported by the NFDI-Matwerk consortia.

Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under the National Research Data Infrastructure – NFDI 38/1 – project number 460247524

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

tools4rdf-0.3.8.tar.gz (45.3 kB view details)

Uploaded Source

Built Distribution

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

tools4rdf-0.3.8-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file tools4rdf-0.3.8.tar.gz.

File metadata

  • Download URL: tools4rdf-0.3.8.tar.gz
  • Upload date:
  • Size: 45.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for tools4rdf-0.3.8.tar.gz
Algorithm Hash digest
SHA256 07e2d10e10dbb78ef18192f504eab4c407a5bc8d637acd999923d819d397e548
MD5 65fb4e3f77aada0bc0e44b9a1ae4a8c1
BLAKE2b-256 1d7ca1a0497531e85de654d068064dbde01be24c424f4d9f72427a1242ee25f0

See more details on using hashes here.

File details

Details for the file tools4rdf-0.3.8-py3-none-any.whl.

File metadata

  • Download URL: tools4rdf-0.3.8-py3-none-any.whl
  • Upload date:
  • Size: 40.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for tools4rdf-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3bb129c6266b2f7d8337de63fdd415065531d3d66d085a8b01f1734177ae2da9
MD5 d337f071209aac0cb4a31c3755ee6bcc
BLAKE2b-256 18ce65143496431638ee0182a82b06fe86672b00567acd817b42380e9893dae4

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