Skip to main content

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
  • sparql - SPARQL query files of 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

or

kurra sparql -h

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kurra-1.0.3.tar.gz (50.2 kB view details)

Uploaded Source

Built Distribution

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

kurra-1.0.3-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file kurra-1.0.3.tar.gz.

File metadata

  • Download URL: kurra-1.0.3.tar.gz
  • Upload date:
  • Size: 50.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for kurra-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e0d69f01f0df84e3809faf5a0a3760364cb6ad43ea94ca5bbbc0b04e58347155
MD5 e5c6c4c19b4d18dd31f8179e8e8211ab
BLAKE2b-256 22de41ec9dfb424e441424382aa14a13158d1fca57f2a46d4946da43fb0dd3b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for kurra-1.0.3.tar.gz:

Publisher: pypi.yml on Kurrawong/kurra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kurra-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: kurra-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for kurra-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6a73015edbceb02c8a0e2b3550c9a093ebbb823d4f761899c31f0fc300d77ea8
MD5 cc3e33878590e4810bd5aa6a42d5fd1d
BLAKE2b-256 70f1ae87a42947bc0804daf718b4f902137436c547eb95cac031989b8a81ce1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for kurra-1.0.3-py3-none-any.whl:

Publisher: pypi.yml on Kurrawong/kurra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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