Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tethysplatform/tethys_dataset_services
A generic Python interface for dataset services such as CKAN and HydroShare.
https://github.com/tethysplatform/tethys_dataset_services
Last synced: about 1 month ago
JSON representation
A generic Python interface for dataset services such as CKAN and HydroShare.
- Host: GitHub
- URL: https://github.com/tethysplatform/tethys_dataset_services
- Owner: tethysplatform
- License: bsd-2-clause
- Created: 2015-01-17T23:22:06.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-09-24T00:07:38.000Z (3 months ago)
- Last Synced: 2024-10-28T22:14:12.027Z (about 2 months ago)
- Language: Python
- Size: 2.9 MB
- Stars: 4
- Watchers: 11
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - tethysplatform/tethys_dataset_services - A generic Python interface for dataset services such as CKAN and HydroShare. (others)
README
[![Unit Tests](https://github.com/tethysplatform/tethys_dataset_services/actions/workflows/unit_tests.yml/badge.svg?branch=tethys4_update)](https://github.com/tethysplatform/tethys_dataset_services/actions/workflows/unit_tests.yml)
[![Coverage](https://coveralls.io/repos/github/tethysplatform/tethys_dataset_services/badge.svg)](https://coveralls.io/github/tethysplatform/tethys_dataset_services)# 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
```4. 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
```5. From the directory with the tox.ini, run the tests using tox:
```
cd ..
tox -e e2e_geoserver_tests
```6. 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 CkanDatasetEngineengine = CkanDatasetEngine(endpoint='http:///api/3/action',
apikey='G3taN@p|k3Y')result = engine.list_datasets()
```