A Python package of RDF data manipulation functions that can be called from the command line or other software
Project description
Kurra
A Python package of RDF data manipulation and data management 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
- SHACL validate or apply rules to RDF data
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.
Once you have installed kurra (see below), you can ask it to tell you what commands it supports
by using the --help or just -h, command, e.g.:
kurra -h
which will return something like:
╭─ Options ─────────────────────────────────────────────────────────────────────────────────╮
│ --version -v │
│ --help -h Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────────────────────────╮
│ db RDF database commands │
│ file RDF file commands │
│ shacl SHACL commands │
│ sparql SPARQL queries to local RDF files or a database │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
To find out more about the specific options within db, file, shacl & sparql, run the help command at the next
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 ────────────────────────────────────────────────────────────────────╮
│ sparql SPARQL query an RDF database │
│ fuseki Fuseki database commands │
│ gsp Graph Store Protocol commands │
│ olis Olis commands │
╰───────────────────────────────────────────────────────────────────────────────╯
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 reformat, make_dataset, export_quads
Development
Install the Poetry project and its dependencies:
task install
Format code:
task format
Test:
task test
You can test the command like app while in development with:
uv tool kurra {COMMANDS}
With {COMMANDS} as per the usual kurra CLI.
Releasing
To build a new release:
- format code:
task format - pass tests:
task test - update version in pyproject.toml
- Git commit & push all updates
- Git tag with release version
git tag 2.2.4git push --tags
- make GitHub release
- this will trigger pypi.yml workflow to publish to PyPI
- update version in pyproject.toml to next release alpha and push
- with message
2.2.4 post release
- with message
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-2.3.4.tar.gz.
File metadata
- Download URL: kurra-2.3.4.tar.gz
- Upload date:
- Size: 109.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30b36eed701f97ae33c81a40cf058ba0f066913edff57d60779778a935dda521
|
|
| MD5 |
419b480b0dc6c22b809a27fe52c276a7
|
|
| BLAKE2b-256 |
ef868fc5dd168a9a50417deca018cd2801309106b7899a1316904fbb2c78c514
|
Provenance
The following attestation bundles were made for kurra-2.3.4.tar.gz:
Publisher:
pypi.yml on Kurrawong/kurra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kurra-2.3.4.tar.gz -
Subject digest:
30b36eed701f97ae33c81a40cf058ba0f066913edff57d60779778a935dda521 - Sigstore transparency entry: 1524493191
- Sigstore integration time:
-
Permalink:
Kurrawong/kurra@af6edb26d5d630224fcbae86f2ec83370e1910e5 -
Branch / Tag:
refs/tags/2.3.4 - Owner: https://github.com/Kurrawong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@af6edb26d5d630224fcbae86f2ec83370e1910e5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kurra-2.3.4-py3-none-any.whl.
File metadata
- Download URL: kurra-2.3.4-py3-none-any.whl
- Upload date:
- Size: 34.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d954babb25be2837519b6bbb6a43e566a49660ee1ba51334fb54351e9076f30
|
|
| MD5 |
c871a8b24c2b2a83786c3839e1a0e8fe
|
|
| BLAKE2b-256 |
eacf27faac9e50cedf91a9dd856439e8ada3ce85ee7c18876bb098e026adef7c
|
Provenance
The following attestation bundles were made for kurra-2.3.4-py3-none-any.whl:
Publisher:
pypi.yml on Kurrawong/kurra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kurra-2.3.4-py3-none-any.whl -
Subject digest:
4d954babb25be2837519b6bbb6a43e566a49660ee1ba51334fb54351e9076f30 - Sigstore transparency entry: 1524493205
- Sigstore integration time:
-
Permalink:
Kurrawong/kurra@af6edb26d5d630224fcbae86f2ec83370e1910e5 -
Branch / Tag:
refs/tags/2.3.4 - Owner: https://github.com/Kurrawong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@af6edb26d5d630224fcbae86f2ec83370e1910e5 -
Trigger Event:
release
-
Statement type: