ckan / ckanapi

A command line interface and Python module for accessing the CKAN Action API
Other
176 stars 74 forks source link

ckanapi - Python 3 support #148

Closed amercader closed 3 years ago

amercader commented 4 years ago

Although tests pass on Python 3.6 my understanding from issues like #95 and #141 is that CLI usage is not yet supported (tests only cover usage as a library)

amercader commented 4 years ago

@wardi can you review and see if I missed anything?

zelima commented 4 years ago

@amercader I can take on this

wardi commented 4 years ago

@amercader yes this looks good. The CLI does work in python 3 but not with the -c option since ckan itself can't be imported from python 3. Looking forward to having that restriction removed!

amercader commented 4 years ago

@zelima amazing thanks!

simeonackermann commented 3 years ago

With current CKAN 2.9.1 and Python 3 I can't execute ckanapi for local CKAN instances,resp get the error message:

File "/srv/app/src/ckan/ckanext/datastore/logic/auth.py", line 43, in <module>
    @p.toolkit.auth_allow_anonymous_access
  File "/srv/app/src/ckan/ckan/plugins/toolkit.py", line 563, in __getattr__
    raise AttributeError('`%s` not found in plugins toolkit' % name)
AttributeError: `auth_allow_anonymous_access` not found in plugins toolkit
wardi commented 3 years ago

ckanapi cli now supports local commands with Python 3 and CKAN 2.9+