Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b1864a0
feat(client.py): Rename auth params and procedure to align with new W…
AlexGherardelli May 20, 2026
a0b21f0
docs: add knots 3.0.0 to pyproject.toml
AlexGherardelli May 20, 2026
35cd158
chore: remove installation from Github for data-bridges-client
AlexGherardelli May 20, 2026
cd8836c
Update version in pyproject.toml
paololucchino May 20, 2026
53bb99f
Point data-bridges-client to hip pypi repository
paololucchino May 20, 2026
aeca8d6
Merge branch 'release/v3.0.0' of github.com:WFP-VAM/DataBridgesKnots …
paololucchino May 20, 2026
e4746f0
Reintroduce hip pypi uv source
paololucchino May 20, 2026
4c528a3
chore: update pyproject.toml to fix installation of data-bridges-clie…
AlexGherardelli May 21, 2026
b9e7a4d
Bump 2.1.4 -> 3.0.0
AlexGherardelli May 21, 2026
ad8f69b
fix: remove unused deprecation warning
AlexGherardelli May 21, 2026
7116e98
fix: remove obsolete SCOPES from client
AlexGherardelli May 21, 2026
531a93e
test: add boilerplate code for testing client
AlexGherardelli May 21, 2026
157ed5b
docs: update CHANGELOG and ROADMAP
AlexGherardelli May 21, 2026
15c9838
merge with remote branch
AlexGherardelli May 21, 2026
0382897
fix: host in client
AlexGherardelli May 21, 2026
92e43d1
test: fix some tests, add workflow status badge to README
AlexGherardelli May 21, 2026
e1dbc45
test: adding get_commodities_list test with kwargs
AlexGherardelli May 21, 2026
d23c798
test: add additional tests for client endpoints
AlexGherardelli May 21, 2026
dc50531
fix: remove obsolete endpoints
AlexGherardelli May 21, 2026
9624f5a
test: add tests for all implemented & working endpoints; update ROADMAP
AlexGherardelli May 21, 2026
c1f6622
Potential fix for pull request finding 'First parameter of a method i…
AlexGherardelli May 21, 2026
f8447a5
docs: update README and remove obsolete examples
AlexGherardelli May 21, 2026
cedb14d
chore: apply codestyle
AlexGherardelli May 21, 2026
87c3ce6
Merge branch 'release/v3.0.0' of https://github.com/WFP-VAM/DataBridg…
AlexGherardelli May 21, 2026
caae2dd
chore: update github actions to exclude test_client (as it requires c…
AlexGherardelli May 21, 2026
705ff01
docs: update README
AlexGherardelli May 21, 2026
412d0ef
revert github action
AlexGherardelli May 21, 2026
152b3c8
Pass repo secrets to GitHub action workflow step
paololucchino May 22, 2026
68a5566
Use [""WFP_API_CLIENT_ID", "WFP_API_CLIENT_SECRET", "DATABRIDGES_VERS…
paololucchino May 22, 2026
82193c5
Clean up Exception handling
paololucchino May 22, 2026
38322df
Remove duplicate GHA run after PR merge
paololucchino May 22, 2026
deb8618
Add DATABRIDGES_API_KEY to GHA secrets
paololucchino May 22, 2026
e7c4f08
Fix docstring indentation
paololucchino May 22, 2026
cc414d8
Fix country_iso3 in README
paololucchino May 22, 2026
c0e4458
fix: get_economic_indicator_list response as data_frame
AlexGherardelli May 22, 2026
bda09bd
fix: add mandatory country_iso3 param to get_market_geojson_list, fix…
AlexGherardelli May 22, 2026
5fcb941
fix: tests for market_geojson
AlexGherardelli May 22, 2026
a31745c
merge conflicts
AlexGherardelli May 22, 2026
6e4569e
chore(python-package.yml): amend GitHub Action to test Python packagi…
AlexGherardelli May 22, 2026
c91cdeb
chore: amend python-package.yml action to run only on main
AlexGherardelli May 22, 2026
bf32091
feat!(client): add default API version that can be used in client as …
AlexGherardelli May 22, 2026
d406a31
chore: linting + add dev dependency for tests
AlexGherardelli May 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/workflows/actions-updater.yml

This file was deleted.

10 changes: 6 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: write
Expand Down Expand Up @@ -36,6 +33,11 @@ jobs:
- name: Run tests
run: |
uv run pytest
env:
WFP_API_CLIENT_ID: ${{ secrets.WFP_API_CLIENT_ID }}
WFP_API_CLIENT_SECRET: ${{ secrets.WFP_API_CLIENT_SECRET }}
DATABRIDGES_VERSION: ${{ secrets.DATABRIDGES_VERSION }}
DATABRIDGES_API_KEY: ${{ secrets.DATABRIDGES_API_KEY }}

deploy-docs:
runs-on: ubuntu-latest
Expand All @@ -51,7 +53,7 @@ jobs:
- name: Install uv and set Python version
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
with:
python-version: "3.12"
python-version: "3.13"
- name: Install dependencies
run: uv sync --dev
- name: Deploy documentation
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

## 2.1.4 (2026-05-19)

### Fix
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ check-codestyle:
.PHONY: codestyle
codestyle:
uv run isort --settings-path pyproject.toml ./
uv run black --config pyproject.toml ./
uv run black --fast --config pyproject.toml ./
uv run ruff check . --fix

#* Tests
Expand Down
56 changes: 33 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
# Data Bridges Knots

[![Python package](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/python-package.yml/badge.svg)](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/python-package.yml)

[![CodeQL](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/github-code-scanning/codeql)

[![pages-build-deployment](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/pages/pages-build-deployment)

[![Publish to S3 PyPI](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/publish-s3.yml/badge.svg)](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/publish-s3.yml)


This Python module allows you to get data from the WFP Data Bridges API, including household survey data, market prices, exchange rates, GORP (Global Operational Response Plan) data, and food security data (IPC equivalent). It is a wrapper for the [Data Bridges API Client](https://github.com/WFP-VAM/DataBridgesAPI), providing an easier way to data analysts to get VAM and monitoring data using their language of choice (Python, R and STATA).

## Getting started
User guide on the package can be found [here](https://wfp-vam.github.io/DataBridgesKnots/reference/)
> [!IMPORTANT]
> User guide on the package can be found [here](https://wfp-vam.github.io/DataBridgesKnots/reference/)


## Installation

### Using uv
> :point_right: We recommend using `uv` as package manager. You can install it using the [instructions here](https://docs.astral.sh/uv/getting-started/installation/).
> [!TIP] :point_right: We recommend using `uv` as package manager. You can install it using the [instructions here](https://docs.astral.sh/uv/getting-started/installation/).

Install the `data_bridges_knots` package in your environment using uv:
Install the latest stable `data_bridges_knots` package in your environment using uv:

```
uv venv .venv && source .venv/bin/activate && uv pip install data-bridges-knots \
Expand All @@ -27,6 +38,14 @@ pip install data-bridges-knots \

STATA and R users will also need the appropriate optional dependencies to use this package in their respective software. To install the package with these dependencies, use the following command:


#### Development version
If you're looking for a specific release/development version, you can install it by running this command, and adding the release number:

```
uv pip install git+https://github.com/WFP-VAM/DataBridgesKnots/@release/vX.x.x
```

### STATA users

STATA users need to install the `data_bridges_knots` with additional STATA dependencies (`pystata`, and `stata-setup`):
Expand Down Expand Up @@ -55,16 +74,12 @@ There are three ways to configure DataBridgesShapes:
2. The structure of the file is:

```yaml
NAME: ''
VERSION : ''
KEY: ''
SECRET: ''
DATABRIDGES_VERSION : ''
WFP_API_CLIENT_ID: ''
WFP_API_CLIENT_SECRET: ''
DATABRIDGES_API_KEY: ''
SCOPES:
- ''
- ''
```
3. Replace the placeholders with your actual API key and secret from the Data Bridges API. Update the SCOPES list with the required scopes for your use case.
3. Replace the placeholders with your actual credentials from the Data Bridges API portal.

### Option 2: Dictionary Configuration (Recommended for Testing/Programmatic Use)

Expand All @@ -74,13 +89,9 @@ You can also initialize the client directly with a Python dictionary:
from data_bridges_knots import DataBridgesShapes

config = {
'KEY': 'your-api-key',
'SECRET': 'your-api-secret',
'VERSION': '7.0.0',
'SCOPES': [
'vamdatabridges_household-fulldata_get',
'vamdatabridges_marketprices-pricemonthly_get'
],
'WFP_API_CLIENT_ID': 'your-api-key',
'WFP_API_CLIENT_SECRET': 'your-api-secret',
'DATABRIDGES_VERSION': 'v1',
'DATABRIDGES_API_KEY': 'optional-databridges-key'
}

Expand All @@ -92,10 +103,9 @@ client = DataBridgesShapes(config)
Set the following environment variables and use the `config_from_env()` helper:

```bash
export DATABRIDGES_KEY="your-api-key"
export DATABRIDGES_SECRET="your-api-secret"
export DATABRIDGES_VERSION="7.0.0"
export DATABRIDGES_SCOPES="scope1,scope2,scope3"
export WFP_API_CLIENT_ID="your-api-key"
export WFP_API_CLIENT_SECRET="your-api-secret"
export DATABRIDGES_VERSION="v1"
export DATABRIDGES_API_KEY="optional-databridges-key"
```

Expand Down Expand Up @@ -125,7 +135,7 @@ CONFIG_PATH = r"data_bridges_api_config.yaml"
client = DataBridgesShapes(CONFIG_PATH)

# COMMODITY DATA
commodity_units_list = client.get_commodity_units_list(country_code="TZA", commodity_unit_name="Kg", page=1, format='json')
commodity_units_list = client.get_commodity_units_list(country_iso3="TZA", commodity_unit_name="Kg", page=1, format='json')

```
Additional examples are in the [examples](https://github.com/WFP-VAM/DataBridgesKnots/tree/main/examples) folder and in the [API Reference document](https://wfp-vam.github.io/DataBridgesKnots/reference/)
Expand Down
Loading