Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
59 changes: 42 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,58 @@

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
# Installation
> [!IMPORTANT]
> User guide on the package can be found [here](https://wfp-vam.github.io/DataBridgesKnots/reference/)

## Using uv

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

### Using uv
> [!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/).
```
uv pip install data-bridges-knots \
--extra-index-url https://d2i4vvypvg40rv.cloudfront.net/pypi/ \
--index-strategy unsafe-first-match
```

Install the latest stable `data_bridges_knots` package in your environment using uv:
### Project setup
For projects, we recommend instead setting up the pyproject.toml by:

```
uv venv .venv && source .venv/bin/activate && uv pip install data-bridges-knots \
--extra-index-url https://d2i4vvypvg40rv.cloudfront.net/pypi/
uv init
```

### Using pip
You can also install the `data_bridges_knots` package using regular `pip`:
Then configure `pyproject.toml` as follows:

```
pip install data-bridges-knots \
--extra-index-url https://d2i4vvypvg40rv.cloudfront.net/pypi/
[[tool.uv.index]]
url = "https://d2i4vvypvg40rv.cloudfront.net/pypi/"
name = "wfp-private"
explicit = true

[tool.uv.sources]
data-bridges-knots = { index = "wfp-private" }
data-bridges-client = { index = "wfp-private" }
```

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:
and install the dependencieswith

```
uv sync
```

#### 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:
### Using pip
You can also install the `data_bridges_knots` package using regular `pip`:

```
uv pip install git+https://github.com/WFP-VAM/DataBridgesKnots/@release/vX.x.x
pip install data-bridges-knots \
--extra-index-url https://d2i4vvypvg40rv.cloudfront.net/pypi/
--index-strategy unsafe-first-match
```

### STATA users
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:

## STATA users

STATA users need to install the `data_bridges_knots` with additional STATA dependencies (`pystata`, and `stata-setup`):

Expand All @@ -55,15 +71,24 @@ uv venv .venv && source .venv/bin/activate && uv pip install "data-bridges-knots
--extra-index-url https://d2i4vvypvg40rv.cloudfront.net/pypi/
```

### R users
## R users

R users need to have `reticulate` installed in their machine to run this package as explained in the [R example file](examples/example_R.R)

```R
install.packages("reticulate")
library(reticulate)

```

## 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
```


## Configuration

There are three ways to configure DataBridgesShapes:
Expand Down
14 changes: 5 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "data_bridges_knots"
version = "3.1.2"
version = "3.1.3"
authors = [{ name = "Alessandra Gherardelli", email = "alessandra.gherardelli@wfp.org" }, {name = "Valerio Giuffrida", email = "valerio.giuffrida@wfp.org"}]
description = "Multi programming language wrapper for WFP Data Bridges API client"
readme = "README.md"
Expand Down Expand Up @@ -133,14 +133,10 @@ breaking_change_exclamation_in_title = true


[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple"

[[tool.uv.index]]
name = "wfp-hip-pypi"
url = "https://d2i4vvypvg40rv.cloudfront.net/pypi/"
# explicit = true
name = "wfp-private"
explicit = true

[tool.uv.sources]
data-bridges-client = { index = "wfp-hip-pypi" }

data-bridges-knots = { index = "wfp-private" }
data-bridges-client = { index = "wfp-private" }
Loading