Python wrapper for Central Bureau of Statistics Republic of Latvia pxweb API
Project description
pycsbwrapper
Version 0.0.1
Python wrapper for Central Bureau of Statistics Republic of Latvia pxweb API https://stat.gov.lv/lv/api-un-kodu-vardnicas/api
Forked from https://github.com/vf42/pycspwrapper, added additional functionality for returning valueTexts
which is forked from https://github.com/kirajcg/pyscbwrapper/, replacing the Sweden API endpoints with the Latvian Central Statistics Bureau ones.
Dependencies: requests>=2.21.0
To install:
pip install pycsbwrapper
To import:
from pycsbwrapper import CSB
For info on usage, see the included notebooks.
Changelog
News in version 0.0.1: For wrapper to be better readable by humans and LLMs added parameters for functions that allow returning not just the codes of variables but also texts
get_data - additional parameter added return_text
:param return_text: If False (default), return only value codes. {'key': ['LV0056420', '2025'], 'values': ['456']}
If True, return codes and texts e.g. {'key': [{'code': 'LV0056420', 'text': '..Piltenes pagasts'}, {'code': '2025', 'text': '2025'}], 'values': ['456']}
get_variables - additional parameter added codes
:param codes: If True (default), return value codes.
If False, return human-readable texts.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycsbwrapper-0.0.1.tar.gz.
File metadata
- Download URL: pycsbwrapper-0.0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7b1ec8ffd1ca73d44cfc08010090e19badcbad7ee812adf8af689f7ec3ca670
|
|
| MD5 |
13eda2172ccaafcd3d9fa4474bb9c16c
|
|
| BLAKE2b-256 |
b7326c6b6a5e07857c79e0abcbf69f10f328c442c9270a04b0b9fd52a0b449d4
|
File details
Details for the file pycsbwrapper-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pycsbwrapper-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86f217cbdabb82426b875bc46220ccbd17bc816e91cb7cf662ffe9d41822a217
|
|
| MD5 |
2a7141bf974e94235c82d538590f3e29
|
|
| BLAKE2b-256 |
f861dc8e56d62589ca1eff7dd8386bc00c85ff46608f8a5e584c5c3fb5a0c0c6
|