Skip to main content

CLI tools for OLDAP

Project description

PyPI version GitHub release

OLDAP tools

OLDAP tools is a CLI tool for managing parts of the OLDAP framework. It allows to

  • dump all the data of a given project to a gzipped TriG file
  • load a project from a gzipped TriG file created by oldap-tools
  • load a hierarchical list from a YAML file
  • dump a hierarchical list to a YAML file

Installation

The installation is done using pip: pip install oldap-tools

Usage

The CLI tool provides the following commands:

  • oldap-tools project dump: Dump all the data of a given project to a gzipped TriG file
  • oldap-tools project load: Load a project from a gzipped TriG file created by oldap-tools
  • oldap-tools list dump: Dump a hierarchical list to a YAML file
  • oldap-tools list load: Load a hierarchical list from a YAML file

Common options

  • --graphdb, -g: URL of the GraphDB server (default: "http://localhost:7200")
  • --repo, -r: Name of the repository (default: "oldap")
  • --user, -u: OLDAP user (required) which performs the operations
  • --password -p: OLDAP password (required)
  • --graphdb_user: GraphDB user (default: None). Not needed if GraphDB runs without athentification.
  • --graphdb_password: GraphDB password (default: None). Not needed if GraphDB runs without athentification.
  • --verbose, -v: Print more information

Command

Project dump

This command dumps all the data of a given project to a gzipped TriG file. It includes user information of all users associated with the project. The command has the following syntax (in addition to the common options):

oldap-tools [common_options] [graphdb-options] project dump [-out <filename>] [--data | --no-data] [-verbose] <project_id>

The graphdb options see above. The other options are defined as follows:

  • -out <filename>: Name of the output file (default: "<project_id>.trig.gz")
  • --data | --no-data: Include or exclude the data of the project (default: include)
  • -verbose: Print more information
  • <project_id>: Project identifier (project shortname)

The file is basically a dump of the project specific named graphs of the GraphDB repository. This are the following graphs:

  • <project_id>:shacl: Contains all the SHACL shapes of the project
  • <project_id>:onto: Contains all the OWL ontology information of the project
  • <project_id>:lists: Contains all the hierarchical lists of the project
  • <project_id>:data: Contains all the resources (instances) of the project

The user information is stored as special comment in the TriG file and is interpreted by oldap-tools project load.

Project load

This command loads a project from a gzipped TriG file created by oldap-tools. It has the following syntax (in addition to the common options):

oldap-tools [common_options] [graphdb-options] project load --i <filename>

The options are as follows:

  • --inf, -i: Name of the input file (required)
  • -verbose: Print more information

If a user does not exist, then the user is created. If the User is already existing, then the user is replaced.

NOTE: This will change in the future in order to only update project specific permissions to the existing user.

List dump

This command dumps a hierarchical list to a YAML file. This file can be edited to add/remove or change list items. The command has the following syntax (in addition to the common options):

oldap-tools [common_options] list dump [-out <filename>] <project_id> <list_id>

This command generates a YAML file which can be edited and contains the list and all it nodes

The options are as follows:

  • -out , -o: Output file
  • <project_id>: Project identifier (project shortname)
  • <list_id>: List identifier

List load

This command loads a hierarchical list from a YAML file into the given project. The command has the following syntax (in addition to the common options):

oldap-tools [common_options] list load --inf <filename> <project_id>

The options are as follows:

  • --inf, -i: Name of the input file (required)
  • <project_id>: Project identifier (project shortname)

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

oldap_tools-0.1.3.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

oldap_tools-0.1.3-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file oldap_tools-0.1.3.tar.gz.

File metadata

  • Download URL: oldap_tools-0.1.3.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.12 Darwin/25.2.0

File hashes

Hashes for oldap_tools-0.1.3.tar.gz
Algorithm Hash digest
SHA256 05fb6e62a932bb18a78f3d06fce9d50d22d67ad5eb1781a91ed44af25c47566b
MD5 d376c8b78ab6bce9c5cf540b738ec66f
BLAKE2b-256 8563d85e67a5c8366b35cde4ac0d0d0a55c65e5b6e8f61444af41f66ed053ab8

See more details on using hashes here.

File details

Details for the file oldap_tools-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: oldap_tools-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.12 Darwin/25.2.0

File hashes

Hashes for oldap_tools-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 096c22d525d6874b4c3f424712ff44ae48b021bcbe7d1ec1a23dc5d13a1ffa62
MD5 03fe45d9e611989205552125a3bb1380
BLAKE2b-256 8d31d683d8ef18b03792b44fad8d13afca8fdc7f674ad8f232458584e0783ba9

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