dgraziotin / libckan Goto Github PK
View Code? Open in Web Editor NEWPython library for OKFN CKAN APIv3.
License: BSD 3-Clause "New" or "Revised" License
Python library for OKFN CKAN APIv3.
License: BSD 3-Clause "New" or "Revised" License
Go over these API docs URLS:
To collect nouns and verbs, plus indications on return values of the API functions.
Decide then how to structure libckan
See [http://docs.ckan.org/en/ckan-1.8/coding-standards.html#imports](CKAN docs)
I am sick of manually writing the same code and almost the same docs. Let's copy from CKAN code and let' s do that in a clever way.
'misc' : [
'licence_list',
'site_read',
]
Look here: https://github.com/okfn/ckan/tree/master/ckan/model
And perform queries to the API (e.g., to http://master.ckan.org/dataset/almost-empty-dataset)
To retrieve the relevant attributes returned by CKAN API
Create a from_dict method to create a Package object when a Python dict is retrieved from the API call (see #1)
Keep the libckan.logic.action.get.{action} but separate the functions according to concerns (e.g., package, organization, etc.). Maybe play with init.py to accomplish that.
'organization' : [
'organization_list',
'organization_list_for_user',
'organization_show',
],
Do a call to ckan.logic.action.get.package_search through libckan interfaces and test it.
Using only q parameter is sufficient for showcasing.
'tag' : [
'tag_autocomplete',
'tag_list',
'tag_search',
'tag_show',
'tag_show_rest',
],
Get inspired by these https://github.com/okfn/ckanclient/blob/master/ckanclient/__init__.py#L49 :-)
'follow' : [
'group_followee_count',
'group_followee_list',
'group_follower_count',
'group_follower_list',
'dataset_followee_count',
'dataset_followee_list',
'dataset_follower_count',
'dataset_follower_list',
'followee_count',
'followee_list',
'user_followee_count',
'user_followee_list',
'user_follower_count',
'user_follower_list',
'am_following_dataset',
'am_following_group',
'am_following_user',
]
'activity' : [
'dashboard_activity_list',
'dashboard_activity_list_html',
'dashboard_new_activities_count',
'activity_detail_list',
'group_activity_list',
'group_activity_list_html',
'organization_activity_list',
'organization_activity_list_html',
'package_activity_list',
'package_activity_list_html',
'user_activity_list',
'user_activity_list_html',
'recently_changed_packages_activity_list',
'recently_changed_packages_activity_list_html',
],
'resource' : [
'resource_search',
'resource_show',
],
'revision' : [
'revision_list',
'revision_show',
'package_revision_list',
'group_revision_list',
],
'term' : [
'term_translation_show',
'vocabulary_list',
'vocabulary_show',
'format_autocomplete',
],
Reformat the code to be PEP8 compliant
'user': [
'user_autocomplete',
'user_list',
'user_show',
'get_site_user',
'member_list',
],
'roles' : [
'roles_show',
'member_roles_list',
],
'group': [
'group_list',
'group_list_authz',
'group_show',
'group_show_rest',
],
This must be done as a regression test.
See https://gist.github.com/seanh/4130567/ and enapsulate it in a API class with other convenient methods/instance variables (e.g., API key and base_url can stay here in the initial versions)
'package' : [
'package_autocomplete',
'package_list',
'package_relationships_list',
'package_search',
'package_show',
'package_show_rest',
'current_package_list_with_resources',
'group_package_show',
]
'related' : [
'related_list',
'related_show',
],
Drop Python custom classes, go back to dicts and lists
Implement ckan.logic.action.get
Follow CKAN syntax, e.g., libckan.logic.action.get.package_search(q='test')
Create two packages in master.ckan.org, one almost full the other almost empty
Doublecheck Package attributes
Check default values for attributes
'status' : [
'status_show',
'resource_status_show',
'task_status_show',
],
At least 90%
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.