hdx-python-api 6.6.6__tar.gz → 6.6.7__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.
Files changed (145) hide show
  1. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/PKG-INFO +1 -1
  2. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/documentation/index.md +0 -33
  3. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/_version.py +2 -2
  4. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/data/organization.py +50 -1
  5. hdx_python_api-6.6.7/tests/fixtures/organization/organization_list_all_fields.yaml +389 -0
  6. hdx_python_api-6.6.7/tests/fixtures/update_dataset_resources/expected_resources_to_update.json +83 -0
  7. hdx_python_api-6.6.7/tests/fixtures/update_dataset_resources/unesco_dataset.json +326 -0
  8. hdx_python_api-6.6.7/tests/fixtures/update_dataset_resources/unesco_update_dataset.json +106 -0
  9. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_logic/update_logic_resources.yaml +0 -3
  10. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_logic/update_logic_resources_new.yaml +0 -3
  11. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_organization.py +33 -1
  12. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_update_dataset_resources.py +8 -33
  13. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_update_logic.py +1 -24
  14. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_user.py +3 -1
  15. hdx_python_api-6.6.6/tests/fixtures/update_dataset_resources/expected_resources_to_update.json +0 -85
  16. hdx_python_api-6.6.6/tests/fixtures/update_dataset_resources/unesco_dataset.json +0 -1
  17. hdx_python_api-6.6.6/tests/fixtures/update_dataset_resources/unesco_update_dataset.json +0 -1
  18. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/.github/workflows/publish.yaml +0 -0
  19. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/.github/workflows/run-python-tests.yaml +0 -0
  20. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/.gitignore +0 -0
  21. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/.pre-commit-config.yaml +0 -0
  22. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/LICENSE +0 -0
  23. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/README.md +0 -0
  24. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/documentation/.readthedocs.yaml +0 -0
  25. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/documentation/mkdocs.yaml +0 -0
  26. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/pyproject.toml +0 -0
  27. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/__init__.py +0 -0
  28. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/configuration.py +0 -0
  29. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/hdx_base_configuration.yaml +0 -0
  30. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/locations.py +0 -0
  31. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/remotehdx.py +0 -0
  32. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/utilities/__init__.py +0 -0
  33. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/utilities/date_helper.py +0 -0
  34. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/utilities/filestore_helper.py +0 -0
  35. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/utilities/hdx_error_handler.py +0 -0
  36. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/utilities/hdx_state.py +0 -0
  37. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/api/utilities/url_utils.py +0 -0
  38. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/data/__init__.py +0 -0
  39. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/data/dataset.py +0 -0
  40. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/data/hdxobject.py +0 -0
  41. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/data/resource.py +0 -0
  42. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/data/resource_matcher.py +0 -0
  43. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/data/resource_view.py +0 -0
  44. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/data/showcase.py +0 -0
  45. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/data/user.py +0 -0
  46. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/data/vocabulary.py +0 -0
  47. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/facades/__init__.py +0 -0
  48. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/facades/infer_arguments.py +0 -0
  49. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/facades/keyword_arguments.py +0 -0
  50. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/src/hdx/facades/simple.py +0 -0
  51. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/__init__.py +0 -0
  52. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/Accepted_Tags.csv +0 -0
  53. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/CKAN/hdx_dataset_static.yaml +0 -0
  54. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/Tag_Mapping.csv +0 -0
  55. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/Tag_Mapping_ChainRuleError.csv +0 -0
  56. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/empty.yaml +0 -0
  57. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_base_config.json +0 -0
  58. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_base_config.yaml +0 -0
  59. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_config.json +0 -0
  60. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_config.yaml +0 -0
  61. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_dataset_static.json +0 -0
  62. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_dataset_static.yaml +0 -0
  63. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_datasource_topline.json +0 -0
  64. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_datasource_topline.yaml +0 -0
  65. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_email_configuration.json +0 -0
  66. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_email_configuration.yaml +0 -0
  67. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_missing_site_config.json +0 -0
  68. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_organization_static.json +0 -0
  69. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_organization_static.yaml +0 -0
  70. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_resource_static.json +0 -0
  71. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_resource_static.yaml +0 -0
  72. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_resource_view_static.json +0 -0
  73. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_resource_view_static.yaml +0 -0
  74. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_showcase_static.json +0 -0
  75. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_showcase_static.yaml +0 -0
  76. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_user_static.json +0 -0
  77. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_user_static.yaml +0 -0
  78. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_vocabulary_static.json +0 -0
  79. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/hdx_vocabulary_static.yaml +0 -0
  80. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/project_configuration.json +0 -0
  81. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/project_configuration.yaml +0 -0
  82. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/user_agent_config.yaml +0 -0
  83. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/user_agent_config2.yaml +0 -0
  84. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/user_agent_config3.yaml +0 -0
  85. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/config/user_agent_config_wrong.yaml +0 -0
  86. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/dataset_search_results.yaml +0 -0
  87. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/download_gen_resource/conflict_data_alg.csv +0 -0
  88. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/download_gen_resource/min_qc_conflict_data_alg.csv +0 -0
  89. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/download_gen_resource/qc_conflict_data_alg.csv +0 -0
  90. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/download_gen_resource/test_data_no_data.csv +0 -0
  91. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/download_gen_resource/test_data_no_years.csv +0 -0
  92. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/empty.csv +0 -0
  93. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/gen_resource/conflict_data_alg.csv +0 -0
  94. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/gen_resource/min_qc_conflict_data_alg.csv +0 -0
  95. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/gen_resource/qc_conflict_data_alg.csv +0 -0
  96. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/gen_resource/test_data_no_data.csv +0 -0
  97. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/gen_resource/test_data_no_years.csv +0 -0
  98. {hdx_python_api-6.6.6/tests/fixtures → hdx_python_api-6.6.7/tests/fixtures/organization}/organization_show_results.yaml +0 -0
  99. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/qc_from_rows/qc_conflict_data_alg.csv +0 -0
  100. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/qc_from_rows/qc_conflict_data_alg_one_col.csv +0 -0
  101. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/resource_formats.json +0 -0
  102. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/showcase_all_search_results.yaml +0 -0
  103. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/size_hash/ACLED-All-Africa-File_20170101-to-20170708.xlsx +0 -0
  104. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/state/analysis_dates.txt +0 -0
  105. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/state/last_build_date.txt +0 -0
  106. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/test_data.csv +0 -0
  107. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/test_data.zip +0 -0
  108. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_dataset_resources/dem_data_zwe.csv +0 -0
  109. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_dataset_resources/dem_indicatorlist_zwe.csv +0 -0
  110. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_dataset_resources/opri_data_zwe.csv +0 -0
  111. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_dataset_resources/opri_indicatorlist_zwe.csv +0 -0
  112. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_dataset_resources/opri_metadata_zwe.csv +0 -0
  113. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_dataset_resources/qc_sdg_data_zwe.csv +0 -0
  114. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_dataset_resources/sdg_data_zwe.csv +0 -0
  115. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_dataset_resources/sdg_indicatorlist_zwe.csv +0 -0
  116. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/fixtures/update_dataset_resources/sdg_metadata_zwe.csv +0 -0
  117. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/__init__.py +0 -0
  118. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/api/__init__.py +0 -0
  119. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/api/test_ckan.py +0 -0
  120. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/api/test_configuration.py +0 -0
  121. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/api/test_locations.py +0 -0
  122. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/api/utilities/__init__.py +0 -0
  123. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/api/utilities/test_filestore_helper.py +0 -0
  124. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/api/utilities/test_hdx_error_handler.py +0 -0
  125. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/api/utilities/test_hdx_state.py +0 -0
  126. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/api/utilities/test_url_utils.py +0 -0
  127. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/conftest.py +0 -0
  128. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/__init__.py +0 -0
  129. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_dataset_add_hapi_error.py +0 -0
  130. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_dataset_core.py +0 -0
  131. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_dataset_noncore.py +0 -0
  132. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_dataset_resource_generation.py +0 -0
  133. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_resource.py +0 -0
  134. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_resource_view.py +0 -0
  135. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_showcase.py +0 -0
  136. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/data/test_vocabulary.py +0 -0
  137. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/facades/__init__.py +0 -0
  138. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/facades/test_infer_arguments.py +0 -0
  139. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/facades/test_keyword_arguments.py +0 -0
  140. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/tests/hdx/facades/test_simple.py +0 -0
  141. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/uv.lock +0 -0
  142. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/workingexample/my_code.py +0 -0
  143. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/workingexample/my_resource.csv +0 -0
  144. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/workingexample/my_resource.xlsx +0 -0
  145. {hdx_python_api-6.6.6 → hdx_python_api-6.6.7}/workingexample/run.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hdx-python-api
3
- Version: 6.6.6
3
+ Version: 6.6.7
4
4
  Summary: HDX Python API for interacting with the Humanitarian Data Exchange
5
5
  Project-URL: Homepage, https://github.com/OCHA-DAP/hdx-python-api
6
6
  Author: Michael Rans
@@ -29,7 +29,6 @@ upload your datasets to HDX.
29
29
  - [Organization](#organization)
30
30
  - [Custom Visualization](#custom-visualization)
31
31
  - [Resource Generation](#resource-generation)
32
- - [QuickCharts Generation](#quickcharts-generation)
33
32
  - [Resource Specific Operations](#resource-specific-operations)
34
33
  - [Showcase Management](#showcase-management)
35
34
  - [User Management](#user-management)
@@ -871,38 +870,6 @@ The rest of the arguments are the same as for `generate_resource`.
871
870
  RESOURCE_DATA, HEADER_INSERTIONS, ROW_FUNCTION,
872
871
  DATECOL or YEARCOL or DATE_FUNCTION, **KWARGS)
873
872
 
874
- ### QuickCharts Generation
875
-
876
- QuickCharts can be generated for datasets using the call below. RESOURCE is a
877
- a resource id or name, or resource metadata from a Resource object or a
878
- dictionary, or the position of the resource in the dataset. It defaults to the
879
- position 0. PATH points to configuration which if not supplied, defaults to the
880
- internal indicators resource view template. You can disable specific bites by
881
- providing BITES_DISABLED, a list of 3 bools where True indicates a specific bite
882
- is disabled and False indicates leave enabled.
883
-
884
- datasets.generate_quickcharts(RESOURCE, "PATH", BITES_DISABLED, INDICATORS,
885
- FIND_REPLACE)
886
-
887
- The parameter INDICATORS is only for use with the built-in configuration and is
888
- a list with 3 dictionaries of form:
889
-
890
- {"code": "MY_INDICATOR_CODE", "title": "MY_INDICATOR_TITLE",
891
- "unit": "MY_INDICATOR_UNIT"}.
892
-
893
- Optionally, the following defaults can be overridden in INDICATORS:
894
-
895
- {"code_col": "#indicator+code", "value_col": "#indicator+value+num",
896
- "date_col": "#date+year", "date_format": "%Y", "aggregate_col": "null"}.
897
-
898
- The built-in configuration assumes data will be of form similar to below:
899
-
900
- GHO (CODE),ENDYEAR,Numeric
901
- #indicator+code,#date+year+end,#indicator+value+num
902
- VIOLENCE_HOMICIDERATE,1994,123.4
903
- MDG_0000000001,2015,123.4
904
-
905
-
906
873
  ## Resource Specific Operations
907
874
 
908
875
  When creating or updating a resource that doesn't have an id, if you supply a parameter
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '6.6.6'
22
- __version_tuple__ = version_tuple = (6, 6, 6)
21
+ __version__ = version = '6.6.7'
22
+ __version_tuple__ = version_tuple = (6, 6, 7)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -260,7 +260,56 @@ class Organization(HDXObject):
260
260
  List of all organization names in HDX
261
261
  """
262
262
  organization = Organization(configuration=configuration)
263
- return organization._write_to_hdx("list", kwargs)
263
+
264
+ # Early return for the standard, non-paginated case
265
+ if not kwargs.get("all_fields"):
266
+ return organization._write_to_hdx("list", kwargs)
267
+
268
+ compiled_orgs = {}
269
+ # Extract limit and offset to dictate our paging sizes, defaulting to 400 and 0
270
+ page_size = kwargs.pop("limit", 400)
271
+ current_offset = kwargs.pop("offset", 0)
272
+
273
+ # 1. Fetch in pages using the provided/default page size
274
+ while True:
275
+ page_kwargs = kwargs.copy()
276
+ page_kwargs["limit"] = page_size
277
+ page_kwargs["offset"] = current_offset
278
+
279
+ page_data = organization._write_to_hdx("list", page_kwargs)
280
+
281
+ if not page_data:
282
+ break
283
+
284
+ # Store by name to automatically deduplicate offset shifts
285
+ for org in page_data:
286
+ compiled_orgs[org["name"]] = org
287
+
288
+ if len(page_data) < page_size:
289
+ break
290
+
291
+ current_offset += page_size
292
+
293
+ # 2. Establish Ground Truth LAST (without limit/offset constraints)
294
+ truth_kwargs = kwargs.copy()
295
+ truth_kwargs["all_fields"] = False
296
+
297
+ ground_truth_names = organization._write_to_hdx("list", truth_kwargs)
298
+
299
+ # 3 & 4. Check for missing IDs, fetch individually, and implicitly prune deletes
300
+ final_orgs = []
301
+ for name in ground_truth_names:
302
+ if name in compiled_orgs:
303
+ final_orgs.append(compiled_orgs[name])
304
+ else:
305
+ try:
306
+ missing_org = organization._write_to_hdx("show", {"id": name})
307
+ if missing_org:
308
+ final_orgs.append(missing_org)
309
+ except Exception:
310
+ pass
311
+
312
+ return final_orgs
264
313
 
265
314
  @classmethod
266
315
  def autocomplete(
@@ -0,0 +1,389 @@
1
+ - approval_status: approved
2
+ closed_organization: true
3
+ created: '2017-08-11T10:55:20.401051'
4
+ custom_org: '1'
5
+ customization: '{"highlight_color": "", "logo_bg_color": "", "topline_resource": "", "image_sq": "2017-08-21-220827.782974save.png", "image_rect": "2017-08-21-220827.783390save.png"}'
6
+ description: Save the Children comprises Save the Children International and 30 member organisations working to deliver change for children in around 120 countries. Save the Children International delivers our programmes internationally to ensure we achieve the greatest possible impact for children. We have a small centre and seven regional offices. Our members work together to campaign for better outcomes for children, and to deliver programmes at scale to support children.
7
+ display_name: Save the Children (inactive)
8
+ fts_id: ''
9
+ hdx_org_type: international_org
10
+ id: b1d11528-6af6-4eef-afd5-0c0349e31a94
11
+ image_display_url: ''
12
+ image_url: ''
13
+ is_organization: true
14
+ modified_at: '1720443787139'
15
+ name: savethechildren
16
+ num_followers: 250
17
+ org_acronym: STC
18
+ org_url: https://www.savethechildren.net
19
+ package_count: 1
20
+ request_membership: 'true'
21
+ state: active
22
+ title: Save the Children (inactive)
23
+ type: organization
24
+ user_survey_url: ''
25
+ visualization_config: '{"visualization-select":"Choose Visualization Type"}'
26
+ users:
27
+ - about: null
28
+ activity_streams_email_notifications: false
29
+ capacity: member
30
+ created: '2022-07-15T16:45:16.358461'
31
+ display_name: Alejandro López
32
+ email_hash: fa21957e7ab27bde7c042c6da3b09696
33
+ fullname: Alejandro López
34
+ id: 9dcd302e-56df-4547-8b59-e7824e33037f
35
+ image_display_url: null
36
+ image_url: null
37
+ last_active: null
38
+ name: ajlopez
39
+ number_created_packages: 0
40
+ state: active
41
+ sysadmin: false
42
+ - about: null
43
+ activity_streams_email_notifications: false
44
+ capacity: editor
45
+ created: '2019-12-11T19:15:37.772639'
46
+ display_name: Arshad Malik
47
+ email_hash: 34ea9c834b77c91a44df94da38afe207
48
+ fullname: Arshad Malik
49
+ id: e00af48c-c3be-4d73-920a-525a9a3bb36b
50
+ image_display_url: null
51
+ image_url: null
52
+ last_active: null
53
+ name: arshadmalik
54
+ number_created_packages: 0
55
+ state: active
56
+ sysadmin: false
57
+ - about: null
58
+ activity_streams_email_notifications: false
59
+ capacity: member
60
+ created: '2022-02-02T11:27:50.675851'
61
+ display_name: Bahjat Mansour
62
+ email_hash: 5513e9038fa6a87f6288e963cfd77420
63
+ fullname: Bahjat Mansour
64
+ id: 5fc0f51a-cc53-4fa2-ab29-b79911d2a681
65
+ image_display_url: null
66
+ image_url: null
67
+ last_active: null
68
+ name: beej
69
+ number_created_packages: 0
70
+ state: active
71
+ sysadmin: false
72
+ - about: null
73
+ activity_streams_email_notifications: false
74
+ capacity: member
75
+ created: '2021-01-26T02:46:18.340073'
76
+ display_name: Ros Chanborith
77
+ email_hash: 593d08c254d88ed56a6c8bb4f053f253
78
+ fullname: Ros Chanborith
79
+ id: 982632fb-3ed9-49a5-935e-7d13807ecba4
80
+ image_display_url: null
81
+ image_url: null
82
+ last_active: null
83
+ name: chanborithros
84
+ number_created_packages: 0
85
+ state: active
86
+ sysadmin: false
87
+ - about: null
88
+ activity_streams_email_notifications: false
89
+ capacity: member
90
+ created: '2023-03-09T18:12:04.331114'
91
+ display_name: Gemechis Bizuayehu
92
+ email_hash: f6baf7069036d4b7516b720cc192585c
93
+ fullname: Gemechis Bizuayehu
94
+ id: 185e3a50-cc11-4e41-90c1-638c1258849f
95
+ image_display_url: null
96
+ image_url: null
97
+ last_active: '2024-06-19T16:32:53.981045'
98
+ name: gemechisb
99
+ number_created_packages: 0
100
+ state: active
101
+ sysadmin: false
102
+ - about: null
103
+ activity_streams_email_notifications: false
104
+ capacity: admin
105
+ created: '2022-11-14T09:35:17.908745'
106
+ display_name: Closed Bot
107
+ email_hash: 86b409033c7182eb516f93f3ddf3110d
108
+ fullname: Closed Bot
109
+ id: e32d5afb-cc7e-4715-85b7-5a3b849443f5
110
+ image_display_url: null
111
+ image_url: null
112
+ last_active: null
113
+ name: hdxclosedorgbot
114
+ number_created_packages: 0
115
+ state: active
116
+ sysadmin: false
117
+
118
+ - approval_status: approved
119
+ closed_organization: false
120
+ created: '2025-07-09T12:48:46.623265'
121
+ custom_org: '1'
122
+ customization: '{"highlight_color": "", "logo_bg_color": "", "topline_resource": "", "image_sq": "2025-07-09-125523.735905Sawa-World-Logo--small-01.png", "image_rect": "2025-07-09-124846.601972Sawa-World-Logo---FULL-01.png"}'
123
+ description: |
124
+ Sawa World is a global organization with its headquarters in Uganda, East Africa. The organization uses a locally-led and innovative approach to eradicate global poverty by providing large-scale access to locally created, easy-to-start, and eco-friendly local solutions that are found by youth living in poverty. These locally created business skills can generate income and improve the lives of youth and their households.
125
+ Since 2011, Sawa World has reached over 88,000 youth, encouraged them to start over 19,000 micro-businesses, and improved the livelihoods of an estimated 780,000 families. Sawa World’s model has been implemented in 11 countries. We have worked with numerous international governments and development organizations, including the Lavazza Foundation, U.S. President's Emergency Plan for AIDS Relief (PEPFAR), TechnoServe, Mercy Corps, Italia Uganda Foundation, Stromme Foundation, School For Life Foundation, Komo Learning Centres, and Aidsfonds (Netherlands), among others.
126
+ display_name: Sawa World
127
+ fts_id: ''
128
+ hdx_org_type: national_ngo
129
+ id: 80c2001f-743b-46de-90a8-d3c761f0e26a
130
+ image_display_url: ''
131
+ image_url: ''
132
+ is_organization: true
133
+ modified_at: '1753864829787'
134
+ name: sawa-world
135
+ num_followers: 0
136
+ org_acronym: SW
137
+ org_url: https://sawaworld.org/
138
+ package_count: 3
139
+ request_membership: 'true'
140
+ state: active
141
+ title: Sawa World
142
+ type: organization
143
+ user_survey_url: ''
144
+ visualization_config: '{"visualization-select":"Choose Visualization Type"}'
145
+ users:
146
+ - about: HDX Data Manager
147
+ activity_streams_email_notifications: false
148
+ capacity: admin
149
+ created: '2022-03-04T11:39:36.361842'
150
+ display_name: HDX Nyamgeroh
151
+ email_hash: b81807158748c46734d7d8b574bd1d9e
152
+ fullname: HDX Nyamgeroh
153
+ id: b682f6f7-cd7e-4bd4-8aa7-f74138dc6313
154
+ image_display_url: null
155
+ image_url: null
156
+ last_active: '2026-04-02T15:56:33.140194'
157
+ name: berylnyamgeroh
158
+ number_created_packages: 76
159
+ state: active
160
+ sysadmin: true
161
+ - about: null
162
+ activity_streams_email_notifications: false
163
+ capacity: admin
164
+ created: '2025-07-03T12:57:47.407907'
165
+ display_name: Esther Makooma
166
+ email_hash: 9fdd2141f5b4e0a00ff3343c5fdcfa05
167
+ fullname: Esther Makooma
168
+ id: 00e2ee07-f00d-4d6d-a0f4-802086eb39d9
169
+ image_display_url: null
170
+ image_url: null
171
+ last_active: '2025-12-16T09:19:55.239180'
172
+ name: esther_makooma
173
+ number_created_packages: 3
174
+ state: active
175
+ sysadmin: false
176
+
177
+ - approval_status: approved
178
+ closed_organization: false
179
+ created: '2018-01-09T08:02:11.710347'
180
+ custom_org: '1'
181
+ customization: '{"highlight_color": "#fa0404", "logo_bg_color": "", "topline_resource": "", "image_sq": "2021-07-12-121351.546970Scofield_Associates_icon_logo.jpg", "image_rect": "2021-07-12-121351.55547220210407_Youtube_Cover.png"}'
182
+ description: Scofield Associates is a premier research consultancy firm specializing in Conflict Management Consulting, Market Research, Big Data Analytics, and Monitoring and Evaluation. Our extensive presence spans across Kenya, Somalia, Uganda, Tanzania, Rwanda, Ethiopia, Sudan, South Sudan, and Eritrea. By seamlessly integrating cutting-edge research, robust Big Data Analytics, and meticulous Evaluation methodologies, we are dedicated to delivering impactful and sustainable solutions in the diverse landscapes of the countries we serve.
183
+ display_name: Scofield Associates Limited
184
+ hdx_org_type: academic_research
185
+ id: 23919c28-c5c0-4ba7-ab94-21a0611f12a8
186
+ image_display_url: ''
187
+ image_url: ''
188
+ is_organization: true
189
+ modified_at: '1703494980711'
190
+ name: scofieldassociates
191
+ num_followers: 46
192
+ org_acronym: SA
193
+ org_url: https://scofieldassociates.co.ke/
194
+ package_count: 2
195
+ request_membership: 'true'
196
+ state: active
197
+ title: Scofield Associates Limited
198
+ type: organization
199
+ visualization_config: '{"visualization-select":"Choose Visualization Type"}'
200
+ users:
201
+ - about: null
202
+ activity_streams_email_notifications: false
203
+ capacity: editor
204
+ created: '2018-02-05T09:24:25.968897'
205
+ display_name: fmuchai-6945
206
+ email_hash: 25abf03a6c27611496fb9b1ab3f53c19
207
+ fullname: fmuchai-6945
208
+ id: c56508e3-2e05-42ce-8103-6ca0884269cf
209
+ image_display_url: null
210
+ image_url: null
211
+ last_active: null
212
+ name: fmuchai-6945
213
+ number_created_packages: 0
214
+ state: pending
215
+ sysadmin: false
216
+ - about: null
217
+ activity_streams_email_notifications: false
218
+ capacity: admin
219
+ created: '2017-12-27T16:25:30.729265'
220
+ display_name: Scofield Muliru
221
+ email_hash: 90439734e2abf380581af437df6d8f93
222
+ fullname: Scofield Muliru
223
+ id: e030b0f7-3105-41a3-b160-f77c2c11606b
224
+ image_display_url: null
225
+ image_url: null
226
+ last_active: '2024-12-19T06:30:31.074116'
227
+ name: muliruscofield
228
+ number_created_packages: 1
229
+ state: active
230
+ sysadmin: false
231
+
232
+ - approval_status: approved
233
+ closed_organization: false
234
+ created: '2014-12-11T22:14:09.014535'
235
+ custom_org: '1'
236
+ customization: '{"highlight_color": "", "logo_bg_color": "", "topline_resource": "", "image_sq": "2018-09-18-103125.409429SAS1.jpg", "image_rect": "2021-12-31-032512.043481Screen-Shot-2021-12-31-at-10.24.56.png"}'
237
+ description: The Small Arms Survey is an independent research project located at the Graduate Institute of International and Development Studies in Geneva, Switzerland. It serves as the principal international source of public information on all aspects of small arms and armed violence and as a resource for governments, policymakers, researchers, and civil society. The Small Arms Survey commissions research and conducts collaborative projects with independent researchers, international organizations, governmental entities, UN agencies, research organizations, NGOs, and partner institutions throughout the world. Findings from resulting field research are presented in the project's various publications.
238
+ display_name: Small Arms Survey
239
+ fts_id: ''
240
+ hdx_org_type: academic_research
241
+ id: 8cec3715-5ec7-4c0f-9029-7635b045f368
242
+ image_display_url: ''
243
+ image_url: ''
244
+ is_organization: true
245
+ modified_at: '1720089422351'
246
+ name: small-arms-survey
247
+ num_followers: 127
248
+ org_acronym: Small Arms Survey
249
+ org_url: https://www.smallarmssurvey.org
250
+ package_count: 5
251
+ request_membership: 'true'
252
+ state: active
253
+ title: Small Arms Survey
254
+ type: organization
255
+ user_survey_url: ''
256
+ visualization_config: '{"visualization-select":"Choose Visualization Type"}'
257
+ users:
258
+ - about: null
259
+ activity_streams_email_notifications: false
260
+ capacity: admin
261
+ created: '2019-03-08T09:19:21.454864'
262
+ display_name: Anne-Severine Fabre
263
+ email_hash: b6f7bae88b1df9a46d002fff261beec1
264
+ fullname: Anne-Severine Fabre
265
+ id: 12bb9fa2-401f-4406-a475-509df6513fdc
266
+ image_display_url: null
267
+ image_url: null
268
+ last_active: '2024-12-17T14:21:00.799909'
269
+ name: anneseverine
270
+ number_created_packages: 6
271
+ state: active
272
+ sysadmin: false
273
+ - about: Gianluca Boo is a senior data expert at the Small Arms Survey focusing on data management, analysis, and visualization...
274
+ activity_streams_email_notifications: false
275
+ capacity: admin
276
+ created: '2022-11-10T08:09:03.587752'
277
+ display_name: Gianluca Boo
278
+ email_hash: 47c513d26c0b590b5a87181262bba0aa
279
+ fullname: Gianluca Boo
280
+ id: 695d74ec-10ae-45d0-a9b3-35cc98ed4443
281
+ image_display_url: null
282
+ image_url: null
283
+ last_active: '2024-02-27T13:40:36.567255'
284
+ name: gianluca_boo
285
+ number_created_packages: 1
286
+ state: active
287
+ sysadmin: false
288
+ - about: The Small Arms Survey is an independent research project located at the Graduate Institute of International and Development Studies in Geneva, Switzerland...
289
+ activity_streams_email_notifications: false
290
+ capacity: admin
291
+ created: '2014-12-11T15:41:43.232603'
292
+ display_name: Small Arms Survey
293
+ email_hash: d58c55e6df4626478c4ce662ede65979
294
+ fullname: Small Arms Survey
295
+ id: bf5a74f6-ea35-43dc-90d9-d08171d55220
296
+ image_display_url: null
297
+ image_url: null
298
+ last_active: null
299
+ name: smallarmssurvey
300
+ number_created_packages: 6
301
+ state: active
302
+ sysadmin: false
303
+
304
+ - approval_status: approved
305
+ closed_organization: false
306
+ created: '2024-09-27T08:59:55.305261'
307
+ custom_org: '1'
308
+ customization: '{"highlight_color": "", "logo_bg_color": "", "topline_resource": "", "image_sq": "2024-09-27-090239.960350SWSS_Logo_03_RGB_Transparent.png", "image_rect": "2024-09-27-090239.962685SWSS_Logo_03_RGB_Transparent.png"}'
309
+ description: Solidarity with South Sudan is an international and intercongregational organization that initiated its first projects in South Sudan in 2008...
310
+ display_name: Solidarity with South Sudan
311
+ fts_id: ''
312
+ hdx_org_type: religious
313
+ id: acdd2940-ede6-4314-a75d-0a38dd54bb17
314
+ image_display_url: ''
315
+ image_url: ''
316
+ is_organization: true
317
+ modified_at: '1727443737702'
318
+ name: solidarity-ssd
319
+ num_followers: 0
320
+ org_acronym: CHTI
321
+ org_url: https://solidarityssudan.org/
322
+ package_count: 1
323
+ request_membership: 'true'
324
+ state: active
325
+ title: Solidarity with South Sudan
326
+ type: organization
327
+ user_survey_url: ''
328
+ visualization_config: '{"visualization-select":"Choose Visualization Type"}'
329
+ users:
330
+ - about: HDX Data Manager
331
+ activity_streams_email_notifications: false
332
+ capacity: admin
333
+ created: '2022-03-04T11:39:36.361842'
334
+ display_name: HDX Nyamgeroh
335
+ email_hash: b81807158748c46734d7d8b574bd1d9e
336
+ fullname: HDX Nyamgeroh
337
+ id: b682f6f7-cd7e-4bd4-8aa7-f74138dc6313
338
+ image_display_url: null
339
+ image_url: null
340
+ last_active: '2026-04-02T15:56:33.140194'
341
+ name: berylnyamgeroh
342
+ number_created_packages: 76
343
+ state: active
344
+ sysadmin: true
345
+ - about: null
346
+ activity_streams_email_notifications: false
347
+ capacity: admin
348
+ created: '2024-09-19T08:54:11.854348'
349
+ display_name: Emanuela De Mattia
350
+ email_hash: a56a977da95edf7785be36fa0b19fae1
351
+ fullname: Emanuela De Mattia
352
+ id: 58871533-e7a7-4c7e-a908-fd86398397c3
353
+ image_display_url: null
354
+ image_url: null
355
+ last_active: '2024-12-27T15:00:48.340827'
356
+ name: emanuela-80
357
+ number_created_packages: 1
358
+ state: active
359
+ sysadmin: false
360
+ - about: null
361
+ activity_streams_email_notifications: false
362
+ capacity: admin
363
+ created: '2024-09-27T10:08:11.871424'
364
+ display_name: fundraising-officer-930
365
+ email_hash: f2504d4970b3fc6d908f50e14c8119b9
366
+ fullname: fundraising-officer-930
367
+ id: bc416e07-90bf-47fe-a2d2-bcf78bad3e0d
368
+ image_display_url: null
369
+ image_url: null
370
+ last_active: '2024-09-27T10:18:25.470340'
371
+ name: fundraising-officer-930
372
+ number_created_packages: 0
373
+ state: active
374
+ sysadmin: false
375
+ - about: null
376
+ activity_streams_email_notifications: false
377
+ capacity: admin
378
+ created: '2024-09-27T10:08:10.746600'
379
+ display_name: officemanagereurope-2874
380
+ email_hash: a8458c187cc30dfce6e22d66293a24bc
381
+ fullname: officemanagereurope-2874
382
+ id: 9d5c6911-3359-4c4d-b2ba-ff10ad8f5280
383
+ image_display_url: null
384
+ image_url: null
385
+ last_active: '2024-09-27T10:12:07.710661'
386
+ name: officemanagereurope-2874
387
+ number_created_packages: 0
388
+ state: active
389
+ sysadmin: false
@@ -0,0 +1,83 @@
1
+ [
2
+ {},
3
+ {},
4
+ {},
5
+ {
6
+ "dataset_preview_enabled": "False",
7
+ "description": "SDG 4 Global and The",
8
+ "format": "csv",
9
+ "hash": "ddb03f009656fb4974201b39f3f27203",
10
+ "name": "SDG 4 Global and Thematic data",
11
+ "resource_type": "file.upload",
12
+ "size": 230593,
13
+ "url": "updated_by_file_upload_step",
14
+ "url_type": "upload"
15
+ },
16
+ {
17
+ "dataset_preview_enabled": "False",
18
+ "description": "SDG 4 Global and The",
19
+ "format": "csv",
20
+ "hash": "72bdc3d7c710de2c28d08acbd3ad75f9",
21
+ "name": "SDG 4 Global and Thematic indicator list",
22
+ "resource_type": "file.upload",
23
+ "size": 216041,
24
+ "url": "updated_by_file_upload_step",
25
+ "url_type": "upload"
26
+ },
27
+ {
28
+ "dataset_preview_enabled": "False",
29
+ "description": "SDG 4 Global and The",
30
+ "format": "csv",
31
+ "hash": "9aef656749f15f8a400e8388f251b760",
32
+ "name": "SDG 4 Global and Thematic metadata",
33
+ "resource_type": "file.upload",
34
+ "size": 842237,
35
+ "url": "updated_by_file_upload_step",
36
+ "url_type": "upload"
37
+ },
38
+ {},
39
+ {
40
+ "dataset_preview_enabled": "False",
41
+ "description": "Demographic and Soci",
42
+ "format": "csv",
43
+ "hash": "d3bf9d79aa8af9e2b611d35ca4f69ef1",
44
+ "name": "Demographic and Socio-economic indicator list",
45
+ "resource_type": "file.upload",
46
+ "size": 2002,
47
+ "url": "updated_by_file_upload_step",
48
+ "url_type": "upload"
49
+ },
50
+ {
51
+ "dataset_preview_enabled": "False",
52
+ "description": "Other Policy Relevan",
53
+ "format": "csv",
54
+ "hash": "13f979b415ff4797fb6039b70aaf1f9c",
55
+ "name": "Other Policy Relevant Indicators data",
56
+ "resource_type": "file.upload",
57
+ "size": 319924,
58
+ "url": "updated_by_file_upload_step",
59
+ "url_type": "upload"
60
+ },
61
+ {
62
+ "dataset_preview_enabled": "False",
63
+ "description": "Other Policy Relevan",
64
+ "format": "csv",
65
+ "hash": "a0dfe4211d1c61c399f37cef91754bdc",
66
+ "name": "Other Policy Relevant Indicators indicator list",
67
+ "resource_type": "file.upload",
68
+ "size": 92805,
69
+ "url": "updated_by_file_upload_step",
70
+ "url_type": "upload"
71
+ },
72
+ {
73
+ "dataset_preview_enabled": "False",
74
+ "description": "Other Policy Relevan",
75
+ "format": "csv",
76
+ "hash": "a697e87f21e61327c380c434a4beb95b",
77
+ "name": "Other Policy Relevant Indicators metadata",
78
+ "resource_type": "file.upload",
79
+ "size": 290790,
80
+ "url": "updated_by_file_upload_step",
81
+ "url_type": "upload"
82
+ }
83
+ ]