Skip to main content

A generic Python interface for dataset services such as GeoServer, CKAN, and HydroShare

Project description

Unit Tests Coverage

Tethys Dataset Services

Tethys datasets provides Python programming interface for dataset services such as GeoServer, CKAN and HydroShare.


NOTE

Tethys Dataset Services versions 2.0.0 and up will only support Python 3. For Python 2 support see version 1.7.0.


Installation

Tethys Datasets Services can be installed via conda or downloading the source. To install via conda:

conda install tethys_dataset_services

To install via source:

git clone https://github.com/CI-WATER/django-tethys_dataset_services.git
cd tethys_dataset_services
pip install .

To install a development (editable) version:

git clone https://github.com/CI-WATER/django-tethys_dataset_services.git
cd tethys_dataset_services
pip install --editable .

Tests

Tests are executed using tox:

pip install .[tests]
tox

End-to-End Tests

End-to-end tests are not run automatically, b/c they require some additional set up. They can be run as follows.

  1. Install Docker: https://docs.docker.com/get-docker/

  2. Install Docker Compose: https://docs.docker.com/compose/install/

  3. Run Docker Compose to create test containers:

cd tests
docker-compose up -d
  1. Wait at least 30 seconds for the docker containers to settle down, then run the setup script to create the database tables:
. setup_e2e_tests.sh
  1. From the directory with the tox.ini, run the tests using tox:
cd ..
tox -e e2e_geoserver_tests
  1. It is recommended that after each run, you refresh the Docker containers. Run the following command to remove them:
cd tests
docker-compose down

Then repeat steps 3-5.

Usage

from tethys_dataset_services.engines import CkanDatasetEngine

engine = CkanDatasetEngine(endpoint='http://<ckan_host>/api/3/action',
                         apikey='G3taN@p|k3Y')

result = engine.list_datasets()

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

tethys_dataset_services-2.1.0.tar.gz (58.7 kB view details)

Uploaded Source

Built Distribution

tethys_dataset_services-2.1.0-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file tethys_dataset_services-2.1.0.tar.gz.

File metadata

File hashes

Hashes for tethys_dataset_services-2.1.0.tar.gz
Algorithm Hash digest
SHA256 2813dac68b00ff52ea8dd9d5b937299938898f7e2fbf8306b928c58110ed991c
MD5 9517382c6c02fcef7272aaa25cd8e3cf
BLAKE2b-256 a527e8fca9f8cf99ccfbb7d9f91a656c76b2541755f4c140c6527d8ee874f0f5

See more details on using hashes here.

File details

Details for the file tethys_dataset_services-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tethys_dataset_services-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d2a2ccbfc0a1911fded395849e5c96dd7bf80f389cb1c7458b69154c192cf62
MD5 785764b755ebd5222bbffb89f7f5954f
BLAKE2b-256 07e7827d7c80643612de2cfa29b2a4ae35e063d316b59ab8e8eff257e6e5b720

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