A generic Python interface for dataset services such as GeoServer, CKAN, and HydroShare
Project description
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.
-
Install Docker: https://docs.docker.com/get-docker/
-
Install Docker Compose: https://docs.docker.com/compose/install/
-
Run Docker Compose to create test containers:
cd tests
docker-compose up -d
- 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
- From the directory with the tox.ini, run the tests using tox:
cd ..
tox -e e2e_geoserver_tests
- 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
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
Built Distribution
Hashes for tethys_dataset_services-2.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b78f836c92e7f0e700f92e3656b460f65ed65c12f2945c09442cf8e938b32b7 |
|
MD5 | 3a44072b9be894330e4832377ba956f2 |
|
BLAKE2b-256 | fc4f3e5a9e02901022c3973a41198d77634336b6f1868853ba721c14ab9a5ada |
Hashes for tethys_dataset_services-2.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab80f6ec387b6b9b761cf57ad0940c727293ef16278dd71042f8735043010b75 |
|
MD5 | fa50977079dd84c5e424fd20f64467e2 |
|
BLAKE2b-256 | c24aed733a87151b91871b327891d8424d6e904aa9e9b01e5b97c4677156be0b |