imibare
Programmatic access to official government statistical data.
imibare gives you clean, typed, versioned access to official statistics
straight from the institutions that publish them, as pandas or polars
DataFrames. No scraping, no PDF wrangling.
Coverage today is Rwanda and Kenya: NISR, BNR, MINECOFIN, RSSB, RRA, RURA, RDB
and NAEB in Rwanda, KNBS and CBK in Kenya. Every dataset ID is country-prefixed
(rw.nisr.cpi.monthly, ke.knbs.cpi.monthly), so further countries slot in
without breaking changes.
Install
pip install imibare
Optional extras:
pip install imibare[polars] # return polars DataFrames
pip install imibare[iceberg] # snapshot time travel via load(version=...)
Quick start
import imibare as imi
# Browse the catalog (works offline)
for d in imi.catalog(country="RW")[:5]:
print(d.id, "-", d.name)
# Load a dataset as a pandas DataFrame
df = imi.load("rw.nisr.cpi.monthly")
# Filter by date range
recent = imi.load("rw.nisr.cpi.monthly", start="2023-01-01")
# Kenya works the same way
ke_cpi = imi.load("ke.knbs.cpi.monthly")
# Return a polars DataFrame (requires the [polars] extra)
fx = imi.load("rw.bnr.fx.daily", engine="polars")
Catalog
catalog() returns dataset metadata you can filter by country, topic, or
frequency:
imi.catalog() # every dataset
imi.catalog(country="KE") # Kenya only
imi.catalog(country="RW", topic="prices")
imi.catalog(frequency="daily")
Each entry carries its id, producing institution, coverage window, columns, source URL, and license.
Dataset IDs
Every dataset has a stable, country-prefixed id of four segments:
{country}.{institution}.{topic}.{frequency}
rw.nisr.cpi.monthly
Ids are permanent; a breaking schema change ships under a new suffix
(for example rw.nisr.cpi.monthly.v2).
Versioned data (time travel)
With the [iceberg] extra you can load a dataset as it stood on a given date:
imi.load("rw.nisr.cpi.monthly", version="2025-06-01")
Data access
Both catalog() and load() work with no setup. catalog() reads metadata
bundled in the package; load() fetches the latest data from the public imibare
API. The versioned load(version=...) path additionally requires the [iceberg]
extra and R2 catalog credentials.
load() caches each download under ~/.imibare/cache/. A cached file is used
for up to an hour, then checked against the API, and downloaded again only if
the data has changed. Pass force_download=True to skip the cache.
Links
- Website: https://imibare.org
- Documentation: https://imibare.org/docs
License
Code is released under the MIT License. Data retrieved through this package remains under the license of each source institution; see each dataset's metadata for details.
Metadata
Release files for imibare 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| imibare-0.3.0.tar.gz | 236.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imibare-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 469.6 kB
Release files / imibare-0.3.0.tar.gz
| Download URL | imibare-0.3.0.tar.gz |
|---|---|
| Size | 236.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9285b20f3692d4da0c1c80c0c0af61eb9fce4df36e6ef5c82bdc4c857a87386d
|
|
BLAKE2b-256 checksum How to use checksums |
a78fa8b1a277350bd8082464629195304a99d4319c766e7147c375a3f472831a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / imibare-0.3.0-py3-none-any.whl
| Download URL | imibare-0.3.0-py3-none-any.whl |
|---|---|
| Size | 233.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4ea04cee3d5870784307e7f218fd543ad2ec2df6c09d4f7919aa3cb8b4febb7
|
|
BLAKE2b-256 checksum How to use checksums |
f01a8bb20f22f5401475f012281744aa583de3e4404cf987684c47826c248b7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency log