Skip to content

Commit 132eb82

Browse files
docs: update pyproject and README
1 parent da80e59 commit 132eb82

File tree

3 files changed

+21
-31
lines changed

3 files changed

+21
-31
lines changed

README.md

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.o
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 6.0.0
7-
- Package version: 1.0.0
8-
- Generator version: 7.8.0
7+
- Package version: 6.0.0
8+
- Generator version: 7.5.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010

1111
## Requirements.
@@ -53,21 +53,21 @@ Please follow the [installation procedure](#installation--usage) and then run th
5353

5454
import data_bridges_client
5555
from data_bridges_client.rest import ApiException
56+
from data_bridges_client.token import WfpApiToken
5657
from pprint import pprint
5758

58-
# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/6.0.0
59+
# Configure OAuth2 access token for authorization: default
60+
KEY = ''
61+
SECRET = ''
62+
SCOPES = ['', '']
63+
token = WfpApiToken(api_key=KEY, api_secret=SECRET)
64+
65+
# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.4.0
5966
# See configuration.py for a list of all supported configuration parameters.
6067
configuration = data_bridges_client.Configuration(
6168
host = "https://api.wfp.org/vam-data-bridges/6.0.0"
6269
)
63-
64-
# The client must configure the authentication and authorization parameters
65-
# in accordance with the API server security policy.
66-
# Examples for each auth method are provided below, use the example that
67-
# satisfies your auth use case.
68-
69-
configuration.access_token = os.environ["ACCESS_TOKEN"]
70-
70+
configuration.access_token = token.refresh(scopes=SCOPES)
7171

7272
# Enter a context with an instance of the API client
7373
with data_bridges_client.ApiClient(configuration) as api_client:
@@ -105,17 +105,13 @@ Class | Method | HTTP request | Description
105105
*EconomicDataApi* | [**economic_data_indicator_list_get**](docs/EconomicDataApi.md#economic_data_indicator_list_get) | **GET** /EconomicData/IndicatorList | Returns the lists of indicators.
106106
*EconomicDataApi* | [**economic_data_indicator_name_get**](docs/EconomicDataApi.md#economic_data_indicator_name_get) | **GET** /EconomicData/{indicatorName} | Returns the time series of values for different indicators.
107107
*FoodSecurityApi* | [**food_security_list_get**](docs/FoodSecurityApi.md#food_security_list_get) | **GET** /FoodSecurity/List |
108-
*GorpApi* | [**gorp_country_latest_get**](docs/GorpApi.md#gorp_country_latest_get) | **GET** /Gorp/CountryLatest | Return the latest country dataset of number of acutely food insecure (in thousands) based on WFP Global Operational Response Plan.
109-
*GorpApi* | [**gorp_global_latest_get**](docs/GorpApi.md#gorp_global_latest_get) | **GET** /Gorp/GlobalLatest | Return the latest global dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
110-
*GorpApi* | [**gorp_regional_latest_get**](docs/GorpApi.md#gorp_regional_latest_get) | **GET** /Gorp/RegionalLatest | Return the latest regional dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
111-
*IncubationApi* | [**aims_download_all_analysis_rounds_get**](docs/IncubationApi.md#aims_download_all_analysis_rounds_get) | **GET** /Aims/DownloadAllAnalysisRounds | Each asset has a baseline and several rounds. Each round reflects the number of times the asset has been analysed over time. The number of total rounds changes according to the workstream: Asset Detection (AD) assets can have a total of 5 rounds, while there is no limit to the monitoring of Landscape Impact Assessment (LIA) assets. Assets considered for Site Prioritization (SP) have one round only. Please note that adm0code can be obtained from https://api.vam.wfp.org/geodata/swagger/index.html (VPN access only).
112-
*IncubationApi* | [**aims_download_polygon_files_get**](docs/IncubationApi.md#aims_download_polygon_files_get) | **GET** /Aims/DownloadPolygonFiles | Polygon files are available for Landscape Impact Assessment (LIA) assets only. The file name corresponds to the “Geotrace” name. Please note that adm0code can be obtained from https://api.vam.wfp.org/geodata/swagger/index.html (VPN access only).
113-
*IncubationApi* | [**household_draft_internal_base_data_get**](docs/IncubationApi.md#household_draft_internal_base_data_get) | **GET** /Household/DraftInternalBaseData | Get data that includes the core household fields only by Survey ID. To access this data, please contact Wael ATTIA for authorization. This endpoint will send you only data you have access to, based on permissions assigned to your application profile. The \"apiKey\" can be found in the profile section of the DataBridges application.
114-
*IncubationApi* | [**household_full_data_get**](docs/IncubationApi.md#household_full_data_get) | **GET** /Household/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact Wael ATTIA for authorization. This endpoint will send you only data you have access to, based on permissions assigned to your application profile. The \"apiKey\" can be found in the profile section of the DataBridges application.
108+
*GorpApi* | [**gorp_latest_get**](docs/GorpApi.md#gorp_latest_get) | **GET** /Gorp/Latest | Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
109+
*GorpApi* | [**gorp_list_get**](docs/GorpApi.md#gorp_list_get) | **GET** /Gorp/List | Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
110+
*IncubationApi* | [**household_draft_internal_base_data_get**](docs/IncubationApi.md#household_draft_internal_base_data_get) | **GET** /Household/DraftInternalBaseData | Get data that includes the core household fields only by Survey ID
111+
*IncubationApi* | [**household_full_data_get**](docs/IncubationApi.md#household_full_data_get) | **GET** /Household/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization.
115112
*IncubationApi* | [**household_official_use_base_data_get**](docs/IncubationApi.md#household_official_use_base_data_get) | **GET** /Household/OfficialUseBaseData | Get data that includes the core household fields only by Survey ID
116113
*IncubationApi* | [**household_public_base_data_get**](docs/IncubationApi.md#household_public_base_data_get) | **GET** /Household/PublicBaseData | Get data that includes the core household fields only by Survey ID
117114
*IncubationApi* | [**household_surveys_get**](docs/IncubationApi.md#household_surveys_get) | **GET** /Household/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
118-
*IncubationApi* | [**m_fi_surveys_processed_data_with_keyset_pagination_get**](docs/IncubationApi.md#m_fi_surveys_processed_data_with_keyset_pagination_get) | **GET** /MFI/Surveys/ProcessedDataWithKeysetPagination | Please use this endpoint only for large data retrieval - Response will include only JSON format - Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
119115
*IncubationApi* | [**xls_forms_definition_get**](docs/IncubationApi.md#xls_forms_definition_get) | **GET** /XlsForms/definition | Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
120116
*MarketPricesApi* | [**market_prices_alps_get**](docs/MarketPricesApi.md#market_prices_alps_get) | **GET** /MarketPrices/Alps | Returns time series values of ALPS and PEWI.
121117
*MarketPricesApi* | [**market_prices_price_daily_get**](docs/MarketPricesApi.md#market_prices_price_daily_get) | **GET** /MarketPrices/PriceDaily | Returns a daily time series of commodity market prices.
@@ -152,9 +148,6 @@ Class | Method | HTTP request | Description
152148
- [EconomicIndicatorPropertyPagedResult](docs/EconomicIndicatorPropertyPagedResult.md)
153149
- [Feature](docs/Feature.md)
154150
- [Geometry](docs/Geometry.md)
155-
- [GorpCountryApiDto](docs/GorpCountryApiDto.md)
156-
- [GorpGlobalApiDto](docs/GorpGlobalApiDto.md)
157-
- [GorpRegionalApiDto](docs/GorpRegionalApiDto.md)
158151
- [HouseholdSurveyListDTO](docs/HouseholdSurveyListDTO.md)
159152
- [HouseholdSurveyListDTOPagedResult](docs/HouseholdSurveyListDTOPagedResult.md)
160153
- [IpcValue](docs/IpcValue.md)
@@ -223,26 +216,22 @@ Authentication schemes defined for the API:
223216
- **vamdatabridges_marketprices-priceweekly_get**: vamdatabridges_marketprices-priceweekly_get
224217
- **vamdatabridges_markets-marketsascsv_get**: vamdatabridges_markets-marketsascsv_get
225218
- **vamdatabridges_household-publicbasedata_get**: vamdatabridges_household-publicbasedata_get
226-
- **vamdatabridges_gorp-globallatest_get**: vamdatabridges_gorp-globallatest_get
227219
- **vamdatabridges_mfi-xlsforms_get**: vamdatabridges_mfi-xlsforms_get
228220
- **vamdatabridges_economicdata-indicatorlist_get**: vamdatabridges_economicdata-indicatorlist_get
229221
- **vamdatabridges_markets-geojsonlist_get**: vamdatabridges_markets-geojsonlist_get
230-
- **vamdatabridges_gorp-regionallatest_get**: vamdatabridges_gorp-regionallatest_get
231-
- **vamdatabridges_mfi-surveys-processeddatakeysetpagination_get**: vamdatabridges_mfi-surveys-processeddatakeysetpagination_get
232222
- **vamdatabridges_rpme-surveys_get**: vamdatabridges_rpme-surveys_get
233223
- **vamdatabridges_rpme-xlsforms_get**: vamdatabridges_rpme-xlsforms_get
234224
- **vamdatabridges_mfi-surveys-basedata_get**: vamdatabridges_mfi-surveys-basedata_get
235225
- **vamdatabridges_mfi-surveys-fulldata_get**: vamdatabridges_mfi-surveys-fulldata_get
236226
- **vamdatabridges_household-fulldata_get**: vamdatabridges_household-fulldata_get
237227
- **vamdatabridges_household-officialusebasedata_get**: vamdatabridges_household-officialusebasedata_get
238228
- **vamdatabridges_marketprices-pricemonthly_get**: vamdatabridges_marketprices-pricemonthly_get
239-
- **vamdatabridges_aims-downloadallanalysisrounds_get**: vamdatabridges_aims-downloadallanalysisrounds_get
240229
- **vamdatabridges_markets-list_get**: vamdatabridges_markets-list_get
241230
- **vamdatabridges_currency-list_get**: vamdatabridges_currency-list_get
231+
- **vamdatabridges_gorp-list_get**: vamdatabridges_gorp-list_get
242232
- **vamdatabridges_marketprices-priceraw_get**: vamdatabridges_marketprices-priceraw_get
243233
- **vamdatabridges_rpme-variables_get**: vamdatabridges_rpme-variables_get
244-
- **vamdatabridges_aims-downloadpolygonfiles_get**: vamdatabridges_aims-downloadpolygonfiles_get
245-
- **vamdatabridges_gorp-countrylatest_get**: vamdatabridges_gorp-countrylatest_get
234+
- **vamdatabridges_gorp-latest_get**: vamdatabridges_gorp-latest_get
246235
- **vamdatabridges_currency-usdindirectquotation_get**: vamdatabridges_currency-usdindirectquotation_get
247236
- **vamdatabridges_xlsforms-definition_get**: vamdatabridges_xlsforms-definition_get
248237
- **vamdatabridges_household-draftinternalbasedata_get**: vamdatabridges_household-draftinternalbasedata_get

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "data_bridges_client"
3-
version = "1.0.0"
3+
version = "6.0.0"
44
description = "VAM-Data-Bridges"
55
authors = ["VAM-INFO <wfp.economicanalysis@wfp.org>"]
66
license = "NoLicense"

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
# prerequisite: setuptools
2323
# http://pypi.python.org/pypi/setuptools
2424
NAME = "data-bridges-client"
25-
VERSION = "1.0.0"
25+
VERSION = "6.0.0"
2626
PYTHON_REQUIRES = ">=3.7"
2727
REQUIRES = [
2828
"urllib3 >= 1.25.3, < 2.1.0",
29+
"httpx",
2930
"python-dateutil",
3031
"pydantic >= 2",
3132
"typing-extensions >= 4.7.1",
@@ -47,4 +48,4 @@
4748
API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId&#x3D;cbd1e508-c6e8-459d-96b7-6cac3039c42c&amp;tenantId&#x3D;462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
4849
""", # noqa: E501
4950
package_data={"data_bridges_client": ["py.typed"]},
50-
)
51+
)

0 commit comments

Comments
 (0)