opendatatrentino / ckan-api-client Goto Github PK
View Code? Open in Web Editor NEWPython client for Ckan API.
Home Page: https://github.com/opendatatrentino/ckan-api-client/
License: BSD 2-Clause "Simplified" License
Python client for Ckan API.
Home Page: https://github.com/opendatatrentino/ckan-api-client/
License: BSD 2-Clause "Simplified" License
then, compare behavior/bugs
Create a web application exposing client functionality through RESTful API.
This might be worth putting in its own separate project.
Apparently there is only logical deletion, plus there are some known issues..
Datasets have the following keys:
Resources have the following keys:
Todo:
Problems:
Otherwise, things will fail in weird ways (eg. in most cases we don't care if a string field is actually None
or ""
..)
Eg. it should have a merge_datasets(old, new)
method to allow merging datasets in custom ways
When I update the name of a CKAN Group, the group members are not updated accordingly.
we want to expose all the client functionality through the CLI:
Then remove XFAIL marks from:
XFAIL ckan_api_client/tests/functional/client_lowlev/test_data_loss_on_update.py::test_data_loss_on_update
reason: [NOTRUN] Requires rewrite of prepare_dataset()
XFAIL ckan_api_client/tests/functional/client_lowlev/test_dataset_crud.py::test_delete_dataset
reason: [NOTRUN] Requires rewrite of prepare_dataset()
XFAIL ckan_api_client/tests/functional/client_lowlev/test_dataset_crud.py::test_updating_extras
reason: [NOTRUN] Requires rewrite of prepare_dataset()
Need to check:
After installing it using pip install ckan-api-client
I've the following exception when executing from ckan_api_client.high_level import CkanHighlevelClient
:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-c95dae115e31> in <module>
----> 1 from ckan_api_client.high_level import CkanHighlevelClient
~/software/pyenv/versions/3.9.2/envs/covid19-br/lib/python3.9/site-packages/ckan_api_client/high_level.py in <module>
3
4 from .objects import CkanDataset, CkanOrganization, CkanGroup
----> 5 from .low_level import CkanLowlevelClient
6 from .exceptions import OperationFailure, HTTPError
7
~/software/pyenv/versions/3.9.2/envs/covid19-br/lib/python3.9/site-packages/ckan_api_client/low_level.py in <module>
1 import json
----> 2 import urlparse
3
4 import requests
5
ModuleNotFoundError: No module named 'urlparse'
The correct import inside low_level.py
is probably:
from urllib.parse import urlparse
Installed version from PyPI:
$ pip freeze | grep ckan
ckan-api-client==0.1b5
The synchronization client is used to import harvested data into ckan.
The import strategy is, roughly:
We'd like to support:
It seems like something really useful, to automatically sync datasets to a CKAN instance, but I can't figure out how it works. The documentation is very vague. It says:
data โ Data to be synchronized. Should be a dict (or dict-like) with top level keys coresponding to the object type, mapping to dictionaries of {'id': object}.
But so what is <object>
supposed to be like ? What dictionary should I call that method with ? An example usage would really be welcome.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.