Skip to main content

python tool for working with ontologies and data models

Project description

🧰 tools4RDF

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.6.tar.gz (38.4 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.6-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tools4rdf-0.3.6.tar.gz
Algorithm Hash digest
SHA256 081b1676873b858f038eb8b4caf3fcf9e7b20e1224c0180a0303dc037e588c64
MD5 b0b0a732883702caeab4146141e8c1ac
BLAKE2b-256 953a009cbd7be38f7e717aff108c55e9d58e60be79ae905db150e2dd057b325c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tools4rdf-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9ba7e53a371b23c97e1a9a5e7396a17fee299d8448fe335b2529585eee689ef0
MD5 be3b8aead34306f884d646f5a12201ca
BLAKE2b-256 74118297dcedac97adfc4cc99df402ebafcad3ad2501e8e2863ffb170adfde37

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