Name | laboral-kutxa JSON |
Version |
0.2.1
JSON |
| download |
home_page | |
Summary | Unofficial Laboral Kutxa Python library |
upload_time | 2023-09-10 14:03:13 |
maintainer | |
docs_url | None |
author | Andre Miras |
requires_python | >=3.8 |
license | MIT |
keywords |
laboral
kutxa
bank
banco
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# laboral-kutxa.py
[![Tests](https://github.com/AndreMiras/laboral-kutxa.py/workflows/Tests/badge.svg)](https://github.com/AndreMiras/laboral-kutxa.py/actions/workflows/tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/AndreMiras/laboral-kutxa.py/badge.svg?branch=main)](https://coveralls.io/github/AndreMiras/laboral-kutxa.py?branch=main)
[![PyPI release](https://github.com/AndreMiras/laboral-kutxa.py/workflows/PyPI%20release/badge.svg)](https://github.com/AndreMiras/laboral-kutxa.py/actions/workflows/pypi-release.yml)
[![PyPI version](https://badge.fury.io/py/laboral-kutxa.svg)](https://badge.fury.io/py/laboral-kutxa)
Unofficial Laboral Kutxa Python library
## Install
```sh
pip install laboral-kutxa
```
## Usage
Reading through the `misProductos` list:
```python
import os
from laboralkutxa.api import login, get_my_products
username = os.environ.get("USERNAME")
password = os.environ.get("PASSWORD")
login_response = login(username, password)
token = login_response["token"]
products = get_my_products(token)
print(
[
{"alias": product["alias"], "grupo": product["grupo"]}
for product in products["misProductos"]
]
)
```
Output:
```python
[
{'alias': 'CUENTA 0,0', 'grupo': 'cuentasCorrientes'},
{'alias': 'VISA ELECTRÓN', 'grupo': 'tarjetas'},
{'alias': 'PRESTAMO', 'grupo': 'prestamos'}
]
```
Accessing the aggregated amounts per account types:
```python
products = get_my_products(token)
current_account = products["_Importes"]["_CuentasCorrientes"]
financing = products["_Importes"]["_Financiacion"]
print({"currentAccount": current_account, "financing": financing})
```
Output:
```python
{
'currentAccount': {'cantidad': 4440.13, 'moneda': 'EUR'},
'financing': {'cantidad': 174356.48, 'moneda': 'EUR'}
}
```
## CLI
There's also a command line interface available, try with:
```sh
laboralkutxa --help
```
Raw data
{
"_id": null,
"home_page": "",
"name": "laboral-kutxa",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "laboral,kutxa,bank,banco",
"author": "Andre Miras",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/db/5c/717dfc708e9e1aa22ba74bc179bc1e920bdce5b344490ab787ac781b8c55/laboral-kutxa-0.2.1.tar.gz",
"platform": null,
"description": "# laboral-kutxa.py\n\n[![Tests](https://github.com/AndreMiras/laboral-kutxa.py/workflows/Tests/badge.svg)](https://github.com/AndreMiras/laboral-kutxa.py/actions/workflows/tests.yml)\n[![Coverage Status](https://coveralls.io/repos/github/AndreMiras/laboral-kutxa.py/badge.svg?branch=main)](https://coveralls.io/github/AndreMiras/laboral-kutxa.py?branch=main)\n[![PyPI release](https://github.com/AndreMiras/laboral-kutxa.py/workflows/PyPI%20release/badge.svg)](https://github.com/AndreMiras/laboral-kutxa.py/actions/workflows/pypi-release.yml)\n[![PyPI version](https://badge.fury.io/py/laboral-kutxa.svg)](https://badge.fury.io/py/laboral-kutxa)\n\nUnofficial Laboral Kutxa Python library\n\n## Install\n\n```sh\npip install laboral-kutxa\n```\n\n## Usage\n\nReading through the `misProductos` list:\n\n```python\nimport os\nfrom laboralkutxa.api import login, get_my_products\n\nusername = os.environ.get(\"USERNAME\")\npassword = os.environ.get(\"PASSWORD\")\nlogin_response = login(username, password)\ntoken = login_response[\"token\"]\nproducts = get_my_products(token)\nprint(\n [\n {\"alias\": product[\"alias\"], \"grupo\": product[\"grupo\"]}\n for product in products[\"misProductos\"]\n ]\n)\n```\n\nOutput:\n\n```python\n[\n {'alias': 'CUENTA 0,0', 'grupo': 'cuentasCorrientes'},\n {'alias': 'VISA ELECTR\u00d3N', 'grupo': 'tarjetas'},\n {'alias': 'PRESTAMO', 'grupo': 'prestamos'}\n]\n```\n\nAccessing the aggregated amounts per account types:\n\n```python\nproducts = get_my_products(token)\ncurrent_account = products[\"_Importes\"][\"_CuentasCorrientes\"]\nfinancing = products[\"_Importes\"][\"_Financiacion\"]\nprint({\"currentAccount\": current_account, \"financing\": financing})\n```\n\nOutput:\n\n```python\n{\n 'currentAccount': {'cantidad': 4440.13, 'moneda': 'EUR'},\n 'financing': {'cantidad': 174356.48, 'moneda': 'EUR'}\n}\n```\n\n## CLI\n\nThere's also a command line interface available, try with:\n\n```sh\nlaboralkutxa --help\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Unofficial Laboral Kutxa Python library",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/AndreMiras/laboral-kutxa.py"
},
"split_keywords": [
"laboral",
"kutxa",
"bank",
"banco"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1f02685e64edcff6c473b645d1bb445b472999d6638aa371eb1b2d094dc76383",
"md5": "c6613ef20c981ca0fdbfb34dbb2fd5a8",
"sha256": "518ecabad1445a245ce60a814aad1c918d08396eb2ac7cc597db1fc0f8a7408f"
},
"downloads": -1,
"filename": "laboral_kutxa-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c6613ef20c981ca0fdbfb34dbb2fd5a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5592,
"upload_time": "2023-09-10T14:03:11",
"upload_time_iso_8601": "2023-09-10T14:03:11.910893Z",
"url": "https://files.pythonhosted.org/packages/1f/02/685e64edcff6c473b645d1bb445b472999d6638aa371eb1b2d094dc76383/laboral_kutxa-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "db5c717dfc708e9e1aa22ba74bc179bc1e920bdce5b344490ab787ac781b8c55",
"md5": "205fd76bc90f7d3ae24ff1c827f8cfd1",
"sha256": "1d1614a624a764043ff09162ca2fdbe22073ea3e87242184fabdaa3320c8a86c"
},
"downloads": -1,
"filename": "laboral-kutxa-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "205fd76bc90f7d3ae24ff1c827f8cfd1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9926,
"upload_time": "2023-09-10T14:03:13",
"upload_time_iso_8601": "2023-09-10T14:03:13.499464Z",
"url": "https://files.pythonhosted.org/packages/db/5c/717dfc708e9e1aa22ba74bc179bc1e920bdce5b344490ab787ac781b8c55/laboral-kutxa-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-10 14:03:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AndreMiras",
"github_project": "laboral-kutxa.py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "laboral-kutxa"
}