Skip to main content

A Python library and tools for the DaSCH Service Platform

Project description

PyPI version

DSP-TOOLS - The DaSCH Service Platform Tools Repository

dsp-tools is a python package containing a command line tool for data model (ontology) creation, a library allowing creation of single resources and mass upload using the bulk import of data into the Knora framework.

The package consists of:

  • dsplib Python modules for accessing Knora using the API (ontology creation, data import/export etc.)
  • dsp-tools A command line program to perfrom several operations on a DSP server:
    • create an ontology out of a simple JSON description
    • dump an existing ontology from a DSP server to a JSON file
    • Bulk-upload of data from a XML data file

Go to Full Documentation

Install

Please note that dsp-tools require Python 3.9 for working properly!

To install the latest published version from PyPI, run:

$ pip3 install dsp-tools

To upgrade to the latest published version, run:

$ pip3 install --upgrade dsp-tools

Local Development Environment

Please consult the https://docs.dasch.swiss/developers documentation on how to install these prerequisites.

Makefile for repository management tasks

The project contains a Makefile defining management tasks. Please use make help to see what is available.

To install from source, i.e., this repository, run:

$ make install

Testing

$ make test

Publishing to PyPi

Generate distribution package. Make sure you have the latest versions of setuptools and wheel installed. Remove the distand buil-directories: rm -rf bild dist

$ make upgrade-dist-tools
$ make dist

You can install the package locally from the dist:

$ python3 -m pip install ./dist/some_name.whl

Upload package with twine,

first create ~/.pypirc in your home folder:

[distutils] 
index-servers=pypi
[pypi] 
repository = https://upload.pypi.org/legacy/ 
username =your_username_on_pypi

then upload:

$ make upload

For local development:

$ python3 setup.py --editable .

Requirements

To install the requirements:

$ pip3 install -r requirements.txt

To generate a "requirements" file (usually requirements.txt), that you commit with your project, do:

$ pip3 freeze > requirements.txt

Running tests with Bazel

Run all tests:

$ bazel test //...

Run single test:

$ bazel test //test:test_user

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

dsp-tools-1.0.4.tar.gz (85.4 kB view details)

Uploaded Source

Built Distribution

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

dsp_tools-1.0.4-py3-none-any.whl (104.5 kB view details)

Uploaded Python 3

File details

Details for the file dsp-tools-1.0.4.tar.gz.

File metadata

  • Download URL: dsp-tools-1.0.4.tar.gz
  • Upload date:
  • Size: 85.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for dsp-tools-1.0.4.tar.gz
Algorithm Hash digest
SHA256 822c6bd9aca3ec0cbc5174ff2636099c3e3578f5ec9b8c1ec9853809bceb95fd
MD5 19bcfa15667dafa3d43f302fd7fba797
BLAKE2b-256 40b9202afa2c76c573b319d28799f8900dda9704a7a8960d52d9a0d323b947c3

See more details on using hashes here.

File details

Details for the file dsp_tools-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: dsp_tools-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 104.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for dsp_tools-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 69fba9189923dc318650a3e7e91bc4a6763be79ea16d21b4b00ba5e4801b6ae9
MD5 00679c46d06d2c8bad3e616c75a1bbbc
BLAKE2b-256 5e77771fa8fd4aa6082ea096c1c016f1e3b8b716a8b198117ef4d087c1b9f189

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