A library for mapping CKAN metadata <=> Frictionless metadata.
The library has zero dependencies (not even on Data Package libs). You can use it directly or use it for inspiration. Detailed outline of the algorithm is in the docs or you can read the code.
- Frictionless CKAN Mapper
- Getting started
- Python: install Python. The library is compatible with both Python 2.7+ and Python 3.3+.
Note: The package is installed as
frictionless-ckan-mapper and then imported as
This package contains two modules:
You can import them directly like so:
- Class diagram below of key objects (without attributes)
- Objects with their attributes in this spreadsheet: https://docs.google.com/spreadsheets/d/1XdqGTFni5Jfs8AMbcbfsP7m11h9mOHS0eDtUZtqGVSg/edit#gid=1925460244
Source for CKAN metadata structure:
- Dataset (Package): https://docs.ckan.org/en/2.8/api/index.html#ckan.logic.action.create.package_create
See the code in
See the code in
Clone the repo:git clone https://github.com/frictionlessdata/frictionless-ckan-mapper.git
And install it with pip:pip install -e .
Use the excellent
pytest suite as follows:
To test under both Python 2 and Python 3 environments, we use
tox. You can run the following command:
Note: Make sure that the necessary Python versions are in your environment
PATH (Python 2.7 and Python 3.6).
To see a list of available commands from the
If a previous build exists, make sure to also remove it before building again:
Alternatively, this command will accomplish the same to build packages for both Python 2 and Python 3:
The package will be publicly available at https://test.pypi.org/project/frictionless-ckan-mapper/ and you will be able to
pip install it as usual.
Make sure to update the version of the package in the file
You can quickly review the version to release with
make version, which will print the current version stored in