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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tools4rdf-0.3.7.tar.gz
  • Upload date:
  • Size: 45.2 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.7.tar.gz
Algorithm Hash digest
SHA256 12616c021b5785bce3ae38e43a91356b7b3815d8bd307be805a5fcbef1c5728d
MD5 1fe71e4ce615b53afdb74ffcb0dcb7ef
BLAKE2b-256 5bf86079128a5b74987d08286255a9c442688b4b3b8bb6638f9b7f400529c932

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tools4rdf-0.3.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0357e82002f5291f30b8042fa0362dfd0c8c2c045928a64009dda0f923d0b6c2
MD5 31f273178df8074c7f6c05e403270c96
BLAKE2b-256 0c7d603925ca1737ed0423f2730443ceddc8d45bf46392722151d2464ac5fd9f

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