ckanapi-harvesters 0.0.5__tar.gz → 0.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ckanapi_harvesters-0.0.5/src/ckanapi_harvesters.egg-info → ckanapi_harvesters-0.0.6}/PKG-INFO +1 -1
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/pyproject.toml +1 -1
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/builder_example_test_sql.py +1 -1
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/ckan_api_2_readonly.py +13 -13
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6/src/ckanapi_harvesters.egg-info}/PKG-INFO +1 -1
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/LICENSE +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/README.md +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/setup.cfg +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_action.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_api_key.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_auxiliary.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_configuration.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_defs.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_errors.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_map.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_model.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_vocabulary_deprecated.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/deprecated.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/error_level_message.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/external_code_import.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/list_records.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/login.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/path.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/proxy_config.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/urls.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_aux.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_ckan.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_errors.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_field.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_package.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_package_1_basic.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_package_2_harvesters.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_package_3_multi_threaded.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_package_example.xlsx +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource_datastore.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource_datastore_multi_abc.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource_datastore_multi_folder.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource_datastore_multi_harvester.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource_datastore_unmanaged.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource_datastore_url.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource_init.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource_multi_abc.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource_multi_datastore.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_resource_multi_file.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/builder_example.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/builder_example_aux_fun.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/builder_example_download.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/builder_example_generate_data.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/builder_example_patch_upload.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/builder_example_policy.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/builder_example_tests.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/builder_example_tests_offline.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/package/ckan-dpg.svg +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/package/traces/trace_000.csv +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/package/traces/trace_001.csv +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/package/traces/trace_002.csv +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/package/traces_multi/trace_000.csv +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/package/traces_multi/trace_001.csv +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/package/traces_multi/trace_002.csv +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/example/package/users_local.csv +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/mapper_datastore.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/mapper_datastore_multi.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/specific/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/specific/configuration_builder.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/specific_builder_abc.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/ckan_api.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/ckan_api_0_base.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/ckan_api_1_map.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/ckan_api_3_policy.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/ckan_api_4_readwrite.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/ckan_api_5_manage.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/ckan_api_params.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/deprecated/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/deprecated/ckan_api_deprecated.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/deprecated/ckan_api_deprecated_vocabularies.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/data_cleaner/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/data_cleaner/data_cleaner_abc.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/data_cleaner/data_cleaner_errors.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/data_cleaner/data_cleaner_upload.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/data_cleaner/data_cleaner_upload_1_basic.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/data_cleaner/data_cleaner_upload_2_geom.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/file_formats/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/file_formats/csv_format.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/file_formats/file_format_abc.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/file_formats/file_format_init.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/file_formats/shp_format.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/harvester_abc.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/harvester_errors.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/harvester_init.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/harvester_model.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/harvester_params.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/postgre_harvester.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/postgre_params.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/pymongo_data_cleaner.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/pymongo_harvester.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/pymongo_params.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/policies/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/policies/data_format_policy.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/policies/data_format_policy_abc.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/policies/data_format_policy_custom_fields.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/policies/data_format_policy_defs.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/policies/data_format_policy_errors.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/policies/data_format_policy_lists.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/policies/data_format_policy_tag_groups.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/reports/__init__.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/reports/admin_report.py +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters.egg-info/SOURCES.txt +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters.egg-info/dependency_links.txt +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters.egg-info/requires.txt +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters.egg-info/top_level.txt +0 -0
- {ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/tests/test_builder_example_offline.py +0 -0
{ckanapi_harvesters-0.0.5/src/ckanapi_harvesters.egg-info → ckanapi_harvesters-0.0.6}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ckanapi_harvesters
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: Package helping to upload local resources to a CKAN server using the CKAN API. Metadata and the list of resources can be defined in an Excel spreadsheet. The package includes requests to download resources and checks metadata against formatting rules.
|
|
5
5
|
Author-email: ifpen-gp <63413841+ifpen-gp@users.noreply.github.com>
|
|
6
6
|
Maintainer-email: ifpen-gp <63413841+ifpen-gp@users.noreply.github.com>
|
|
@@ -45,7 +45,7 @@ def run(ckan:CkanApi = None):
|
|
|
45
45
|
cursor = ckan.datastore_search_cursor(users_table_id, limit=1)
|
|
46
46
|
document = next(cursor)
|
|
47
47
|
user_id = document["user_id"]
|
|
48
|
-
cursor = ckan.datastore_search_cursor(traces_table_id, filters={"user_id":
|
|
48
|
+
cursor = ckan.datastore_search_cursor(traces_table_id, filters={"user_id": int(user_id)}, limit=10)
|
|
49
49
|
for document in cursor:
|
|
50
50
|
print(document)
|
|
51
51
|
|
|
@@ -378,7 +378,7 @@ class CkanApiReadOnly(CkanApiMap):
|
|
|
378
378
|
def _api_datastore_search_all(self, resource_id:str, *, filters:dict=None, q:str=None, fields:List[str]=None,
|
|
379
379
|
distinct:bool=None, sort:str=None, limit:int=None, offset:int=0, format:str=None,
|
|
380
380
|
search_all:bool=True, params:dict=None, return_df:bool=True, compute_len:bool=False) \
|
|
381
|
-
-> Union[pd.DataFrame,
|
|
381
|
+
-> Union[pd.DataFrame, ListRecords, Any]:
|
|
382
382
|
"""
|
|
383
383
|
Successive calls to _api_datastore_search_df until an empty list is received.
|
|
384
384
|
|
|
@@ -410,7 +410,7 @@ class CkanApiReadOnly(CkanApiMap):
|
|
|
410
410
|
search_all=search_all, resource_id=resource_id, filters=filters, q=q, fields=fields, distinct=distinct, sort=sort, format=format, compute_len=compute_len)
|
|
411
411
|
# aggregate results, depending on the format
|
|
412
412
|
if self.params.dry_run:
|
|
413
|
-
return []
|
|
413
|
+
return []
|
|
414
414
|
if format is not None:
|
|
415
415
|
format = format.lower()
|
|
416
416
|
if len(responses) > 0:
|
|
@@ -421,12 +421,12 @@ class CkanApiReadOnly(CkanApiMap):
|
|
|
421
421
|
fields_type_dict = None
|
|
422
422
|
df_args = {}
|
|
423
423
|
if format is None or format == "objects":
|
|
424
|
-
return ListRecords(sum([response.result["records"] for response in responses], []))
|
|
424
|
+
return ListRecords(sum([response.result["records"] for response in responses], []))
|
|
425
425
|
else:
|
|
426
426
|
if format == "lists":
|
|
427
|
-
return sum([response.result["records"] for response in responses], [])
|
|
427
|
+
return sum([response.result["records"] for response in responses], [])
|
|
428
428
|
else:
|
|
429
|
-
return "\n".join([response.result["records"] for response in responses])
|
|
429
|
+
return "\n".join([response.result["records"] for response in responses])
|
|
430
430
|
|
|
431
431
|
def _api_datastore_search_all_generator(self, resource_id:str, *, filters:dict=None, q:str=None, fields:List[str]=None,
|
|
432
432
|
distinct:bool=None, sort:str=None, limit:int=None, offset:int=0,
|
|
@@ -518,7 +518,7 @@ class CkanApiReadOnly(CkanApiMap):
|
|
|
518
518
|
|
|
519
519
|
def _api_datastore_search_sql_all(self, sql:str, *, params:dict=None,
|
|
520
520
|
search_all:bool=True, limit:int=None, offset:int=0, return_df:bool=True) \
|
|
521
|
-
-> Union[pd.DataFrame,
|
|
521
|
+
-> Union[pd.DataFrame, ListRecords]:
|
|
522
522
|
"""
|
|
523
523
|
Successive calls to _api_datastore_search_sql until an empty list is received.
|
|
524
524
|
|
|
@@ -548,7 +548,7 @@ class CkanApiReadOnly(CkanApiMap):
|
|
|
548
548
|
fields_type_dict = CkanApiReadOnly.read_fields_type_dict(response.result["fields"])
|
|
549
549
|
else:
|
|
550
550
|
fields_type_dict = None
|
|
551
|
-
return ListRecords(sum([response.result["records"] for response in responses], []))
|
|
551
|
+
return ListRecords(sum([response.result["records"] for response in responses], []))
|
|
552
552
|
|
|
553
553
|
def _api_datastore_search_sql_all_generator(self, sql:str, *, params:dict=None,
|
|
554
554
|
search_all:bool=True, limit:int=None, offset:int=0, return_df:bool=True) \
|
|
@@ -665,7 +665,7 @@ class CkanApiReadOnly(CkanApiMap):
|
|
|
665
665
|
def datastore_search_cursor(self, resource_id:str, *, filters:dict=None, q:str=None, fields:List[str]=None,
|
|
666
666
|
distinct:bool=None, sort:str=None, limit:int=None, offset:int=0, params:dict=None,
|
|
667
667
|
search_all:bool=False, search_method:bool=True, format:str=None, return_df:bool=False) \
|
|
668
|
-
-> Generator[Union[pd.Series,
|
|
668
|
+
-> Generator[Union[pd.Series, dict, list, str], Any, None]:
|
|
669
669
|
"""
|
|
670
670
|
Cursor on rows
|
|
671
671
|
"""
|
|
@@ -687,12 +687,12 @@ class CkanApiReadOnly(CkanApiMap):
|
|
|
687
687
|
for response in generator:
|
|
688
688
|
fields_type_dict = CkanApiReadOnly.read_fields_type_dict(response.result["fields"])
|
|
689
689
|
for element in response.result["records"]:
|
|
690
|
-
yield element
|
|
690
|
+
yield element
|
|
691
691
|
else:
|
|
692
692
|
for response in generator:
|
|
693
693
|
fields_type_dict = CkanApiReadOnly.read_fields_type_dict(response.result["fields"])
|
|
694
694
|
for element in response.result["records"]:
|
|
695
|
-
yield element
|
|
695
|
+
yield element
|
|
696
696
|
else:
|
|
697
697
|
raise TypeError("dumping datastore without parsing with a DataFrame does not return an iterable object")
|
|
698
698
|
|
|
@@ -758,7 +758,7 @@ class CkanApiReadOnly(CkanApiMap):
|
|
|
758
758
|
|
|
759
759
|
def datastore_search_sql_cursor(self, sql:str, *, params:dict=None, search_all:bool=False,
|
|
760
760
|
limit:int=None, offset:int=0, return_df:bool=False) \
|
|
761
|
-
-> Generator[Union[pd.Series,
|
|
761
|
+
-> Generator[Union[pd.Series,dict], Any, None]:
|
|
762
762
|
generator = self.datastore_search_sql_generator(sql, params=params, search_all=search_all,
|
|
763
763
|
limit=limit, offset=offset, return_df=return_df)
|
|
764
764
|
if return_df:
|
|
@@ -774,7 +774,7 @@ class CkanApiReadOnly(CkanApiMap):
|
|
|
774
774
|
for response in generator:
|
|
775
775
|
fields_type_dict = CkanApiReadOnly.read_fields_type_dict(response.result["fields"])
|
|
776
776
|
for element in response.result["records"]:
|
|
777
|
-
yield element
|
|
777
|
+
yield element
|
|
778
778
|
|
|
779
779
|
def datastore_search_sql_find_one(self, sql:str, *, params:dict=None,
|
|
780
780
|
offset:int=0, return_df:bool=True) -> Union[pd.DataFrame, Tuple[ListRecords, dict]]:
|
|
@@ -917,7 +917,7 @@ class CkanApiReadOnly(CkanApiMap):
|
|
|
917
917
|
## Mapping of resource aliases from table
|
|
918
918
|
def list_datastore_aliases(self) -> List[CkanAliasInfo]:
|
|
919
919
|
alias_resource_id = "_table_metadata" # resource name of table containing CKAN aliases
|
|
920
|
-
alias_list_dict
|
|
920
|
+
alias_list_dict = self.datastore_search(alias_resource_id, search_all=True, return_df=False, format="objects", search_method=True)
|
|
921
921
|
alias_list = [CkanAliasInfo(alias_dict) for alias_dict in alias_list_dict]
|
|
922
922
|
for alias_info in alias_list:
|
|
923
923
|
if alias_info.alias_of is not None:
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6/src/ckanapi_harvesters.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ckanapi_harvesters
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: Package helping to upload local resources to a CKAN server using the CKAN API. Metadata and the list of resources can be defined in an Excel spreadsheet. The package includes requests to download resources and checks metadata against formatting rules.
|
|
5
5
|
Author-email: ifpen-gp <63413841+ifpen-gp@users.noreply.github.com>
|
|
6
6
|
Maintainer-email: ifpen-gp <63413841+ifpen-gp@users.noreply.github.com>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_defs.py
RENAMED
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_map.py
RENAMED
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/ckan_model.py
RENAMED
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/deprecated.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/login.py
RENAMED
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/path.py
RENAMED
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/auxiliary/urls.py
RENAMED
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/__init__.py
RENAMED
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_aux.py
RENAMED
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/builder/builder_ckan.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/__init__.py
RENAMED
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/ckan_api/ckan_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/harvesters/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/policies/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/reports/__init__.py
RENAMED
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters/reports/admin_report.py
RENAMED
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters.egg-info/requires.txt
RENAMED
|
File without changes
|
{ckanapi_harvesters-0.0.5 → ckanapi_harvesters-0.0.6}/src/ckanapi_harvesters.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|