frictionlessdata / frictionless-py

Data management framework for Python that provides functionality to describe, extract, validate, and transform tabular data
https://framework.frictionlessdata.io
MIT License
701 stars 147 forks source link

Support private CKAN resources? #1446

Open aivuk opened 1 year ago

aivuk commented 1 year ago

If you use CkanControl to access a private package in a CKAN instance it fetch the package successfully:

from frictionless.portals import CkanControl
from frictionless import Package
api = 'SECRET_KEY'

ckan_control = CkanControl(apikey=api)
package = Package('http://localhost:5000/dataset/privatedata', control=ckan_control)

But it fails when you try to fetch a resource from this package because it tries to download it without using the api key:

resource_data = package.resources[0].read_rows()
roll commented 1 year ago

Thanks, that's a good catch, as we didn't really designed it for non-open data. It will require some additional development -- I'll mark it as a feature request.