Skip to main content

Unofficial Laboral Kutxa Python library

Project description

laboral-kutxa.py

Tests Coverage Status PyPI release PyPI version

Unofficial Laboral Kutxa Python library

Install

pip install laboral-kutxa

Usage

Reading through the misProductos list:

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:

[
    {'alias': 'CUENTA 0,0', 'grupo': 'cuentasCorrientes'},
    {'alias': 'VISA ELECTRÓN', 'grupo': 'tarjetas'},
    {'alias': 'PRESTAMO', 'grupo': 'prestamos'}
]

Accessing the aggregated amounts per account types:

products = get_my_products(token)
current_account = products["_Importes"]["_CuentasCorrientes"]
financing = products["_Importes"]["_Financiacion"]
print({"currentAccount": current_account, "financing": financing})

Output:

{
    'currentAccount': {'cantidad': 4440.13, 'moneda': 'EUR'},
    'financing': {'cantidad': 174356.48, 'moneda': 'EUR'}
}

CLI

There's also a command line interface available, try with:

laboralkutxa --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

laboral-kutxa-0.2.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

laboral_kutxa-0.2.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file laboral-kutxa-0.2.0.tar.gz.

File metadata

  • Download URL: laboral-kutxa-0.2.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for laboral-kutxa-0.2.0.tar.gz
Algorithm Hash digest
SHA256 86f0c0d9cccce0bb924c481d2f83914fc811574aa855304e3f1756384b1eeef4
MD5 e4e2ef7fad495848c1a41cad30823f39
BLAKE2b-256 7368f740c1761b08ae53c04afc95e5a68b963154749113e865fde5fbc81a1d29

See more details on using hashes here.

File details

Details for the file laboral_kutxa-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for laboral_kutxa-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c6089edc8e7c3748eb05c9691726ca577c74b85234b99f7be0143f2043c09ab
MD5 157ac0640d16eccc241a870cb82d3851
BLAKE2b-256 aa270e6db8ff9803a6e0caab9ac2068bbdd409f38a259232bb6d94d8ff75b0c8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page