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 create an ontology out of a simple JSON description
  • knora-reset-triplestore A command line program to reset the content of the ontology. Does not require a restart of the Knora-Stack.

Go to Full Documentation

Install

To install the latest published version from PyPI, run:

$ pip3 install knora

To upgrade to the latest published version, run:

$ pip3 install --upgrade knora

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:

$ make upgrade-dist-tools
$ make dist

You can install the package locally from the dist:

$ python3 -m pip ./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-0.9.2.tar.gz (133.1 kB view details)

Uploaded Source

Built Distribution

dsp_tools-0.9.2-py3-none-any.whl (153.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dsp-tools-0.9.2.tar.gz
  • Upload date:
  • Size: 133.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for dsp-tools-0.9.2.tar.gz
Algorithm Hash digest
SHA256 341f8b4de64d428c774c40c4858d58227b4003084106d62fc30f45261769d4c7
MD5 6b399da1ad571f4944ba411e5c0fca18
BLAKE2b-256 8f77476a275bd6419c7ed2faaf43aeca6190723418290ba8d991152ef4ecce5f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsp_tools-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 153.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for dsp_tools-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 906f27bfbc6ad484150eea7c6e1966c510db5eb792c543d3072e1566464f55aa
MD5 8815aad2ce6a62c6dcf27cb45ae29682
BLAKE2b-256 b8b9306efafa94a32d3865867cacd5d550c6e136836914a3fa0e75c85b935b70

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page