A Python package of RDF data manipulation functions that can be called from the command line or other software
Project description
Kurra Python Library
A Python package of RDF data manipulation functions that can be called from the command line or other software.
This library uses the RDFLib under-the-hood to process RDF data. It supplies functions to:
- manipulate local RDF files
- send commands to RDF databases "triplestores"
- SPARQL query files or databases
kurra is for convenience: the functions it provides are simple but kurra saves you having to reinvent wheels.
CLI app
kurra presents a Command Line Interface that can be used on Mac, Linux and Windows (WSL) command prompts.
The hierarchy of functions provided is:
- db - run commands against RDF databases
- list
- create
- upload
- clear
- delete
- sparql
- file - run commands on local RDF files
- format
- upload
- quads
- sparql
- shacl
- validate - SHACL validate a file
- sparql - SPARQL query files or databases
Once you have installed kurra (see below), you can ask it to tell you what each command does and what inputs are needed by using the --help or just -h, command, e.g.:
kurra -h
which will return something like:
╭─ Options ─────────────────────────────────────────────────────────────────────────────────╮
│ --version -v │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or ... │
│ --help -h Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────────────────────────╮
│ db RDF database commands │
│ file RDF file commands │
│ sparql SPARQL queries to local RDF files or a database │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
To find out more about the specific options within db, file & sparql, run the help command at the lext level, like this:
kurra db -h
or
kurra file -h
etc. for shacl & sparql
To get further help for the particular commands. For db, you will see something like this:
Usage: kurra db [OPTIONS] COMMAND [ARGS]...
RDF database commands
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────╮
│ --help -h Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────────────────────────────╮
│ list Get the list of database repositories │
│ create Create a new database repository │
│ upload Upload files to a database repository │
│ clear Clear a database repository │
│ delete Delete a database repository │
│ sparql Query a database repository │
╰───────────────────────────────────────────────────────────────────────────────────────────────╯
Installation
CLI App
The recommended way to manage and run Python CLI apps is to use the Python package uv which you will need to install first, see the uv installation instructions. then:
uv tool install kurra
Now you can invoke kurra anywhere in your terminal as long as ~/.local/bin is in your PATH.
See the uv documentation on installing tools for more information.
Library
You can also install kurra as a Python library for used of its functions in other applications
pip install kurra
Use the relevant command to add dependencies to your project if you are using a tool like uv, poetry, or conda.
Then import it and use in your code, e.g. for the format functions:
from kurra.file import format_file, make_dataset, export_quads
Development
Install the Poetry project and its dependencies:
task install
Format code:
task code
To build a new release:
- update the version in pyproject.toml
- commit & push all changes
- git tag with the same version number
- push the tag -
git push --tags - build the release -
uv build - publish the release on PyPI -
uv publish- username__token__, pwd is an actual token - make the release on GitHub - https://github.com/Kurrawong/kurra/releases
- don't forget to add the dist zips & wheels to it
- update version number in pyproject.toml to next alpha & push
License
BSD-3-Clause license. See LICENSE.
Contact & Support
kurra is maintained by:
KurrawongAI
http://kurrawong.ai
info@kurrawong.ai
Please contact them for all use & support issues.
You can also log issues at the kurra issue tracker:
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kurra-1.5.5.tar.gz.
File metadata
- Download URL: kurra-1.5.5.tar.gz
- Upload date:
- Size: 99.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dbd0c84f5dae7024e1c33d7a0d16fbc3a38d629520f5e0365172172d33da7f0
|
|
| MD5 |
414cbc0876d6e786311dd791952b5565
|
|
| BLAKE2b-256 |
edbbb9e1ce51fbc13b235add9d2356f6a85352f8276a60b841cb38a5c04b8ceb
|
File details
Details for the file kurra-1.5.5-py3-none-any.whl.
File metadata
- Download URL: kurra-1.5.5-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff606e2e7085e98a609506d92e566d3e22c1745522e64d39fcbb161b970e6526
|
|
| MD5 |
7e6ba16beb4bbf7df13ce51348940431
|
|
| BLAKE2b-256 |
e93490ddc8cf893ca9cd3958108166a399ecf1168e8bf3a5ca13b7d4b98faf2b
|