Skip to main content

Build Status PyPI version Supported Python versions Development Status

ckanext-mongodatastore

This plugin provides a datastore implementation for CKAN, based on MongoDB for storing data records. One aspect of this implementation is, that it follows the RDA Recommendations for Data Citation. This guarantiees citability for every query that is submited to the datastore.

As this extension provides an implementation of the IDatastoreBackend, therefore the DataStore API can be used as before.

Requirements

This CKAN extension is tested with CKAN 2.9.0 running on Python 3.8.2.

To run this plugin beside an CKAN a mongo and a postgre database is required. The mongo database is needed for storing the data records and the postgre database is used as a querystore, described in the RDA Recommendations. For both instances a connection string has to be set in the CKAN config file.

Installation

To install ckanext-mongodatastore:

  1. Install MongoDB

  2. If not already existing, a QueryStore database has to be created::

sudo -u postgres createuser -S -D -R -P querystore
sudo -u postgres createdb -O querystore querystore -E utf-8
  1. Activate your CKAN virtual environment, for example::

. /usr/lib/ckan/default/bin/activate

  1. Install the ckanext-mongodatastore Python package into your virtual environment:

pip install ckanext-mongodatastore

  1. Set the ckanext-mongodatastore specific config settings the CKAN configuration file (by default the config file is located at /etc/ckan/default/production.ini).

  2. Add mongodatastore to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/production.ini).

  3. Initialize the query store with the custom click command create_schema ckan -c "/etc/ckan/default/production.ini" create_schema

  4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::

sudo service apache2 reload

Config Settings

For running the MongoDb datastore two settings have to configured in your CKAN's configuration file::

Name Description Default
ckanext.mongodatastore.mongodb_url URL pointing to the MongoDB instance
ckanext.mongodatastore.querystore_url URL pointing to the QueryStore database
ckanext.mongodatastore.sharding_enabled If a sharded MongoDB instance is used, the sharding feature has to be enabled False
ckanext.mongodatastore.database_name Name of the MongoDB database, that contains all resource collections CKAN_Datastore

Development Installation

To install ckanext-mongodatastore for development, activate your CKAN virtualenv and do::

git clone https://github.com/fwoerister/ckanext-mongodatastore.git
cd ckanext-mongodatastore
python setup.py develop
pip install -r dev-requirements.txt

Running the Tests

To run the tests, do::

nosetests --nologcapture --with-pylons=test.ini

To run the tests and produce a coverage report, first make sure you have coverage installed in your virtualenv (pip install coverage) then run::

nosetests --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.mongodatastore --cover-inclusive --cover-erase --cover-tests

Metadata

Release files for ckanext-mongodatastore 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ckanext-mongodatastore 0.4
File Size Uploaded Provenance Actions
ckanext-mongodatastore-0.4.tar.gz 460.7 kB Without provenance Details for ckanext-mongodatastore-0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ckanext-mongodatastore 0.4
File Interpreter ABI Platform Actions
ckanext_mongodatastore-0.4-py2-none-any.whl Python 2 none any Details for ckanext_mongodatastore-0.4-py2-none-any.whl

Total release size: 932.7 kB

Release files / ckanext-mongodatastore-0.4.tar.gz

Download URL ckanext-mongodatastore-0.4.tar.gz
Size 460.7 kB
Tags Source
SHA-256 checksum
How to use checksums
36561596966d42146ba2999b89927c04723f821689741c3beefd33c2b5d38063
BLAKE2b-256 checksum
How to use checksums
41c9857d18dffd2929f495aa288d7214d388b3053eb0b02bedf42120b6045944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

Release files / ckanext_mongodatastore-0.4-py2-none-any.whl

Download URL ckanext_mongodatastore-0.4-py2-none-any.whl
Size 472.0 kB
Tags Python 2
SHA-256 checksum
How to use checksums
4afa5b73539927019caaf8f83edc277599a6f6fe7906d7a75bf2babb51cd3eeb
BLAKE2b-256 checksum
How to use checksums
98230aa4f5ee6a8ebc81ae4678cceb57570e6411d58a41fb438a8bb4a8942ea7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

Security for ckanext-mongodatastore 0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page