Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Parsing and validation utilites for the Spanish standard norm 43 by the 'Consejo Superior Bancario' (CSB) / 'Asociación Española de Banca' (AEB) for storing bank account transactions | [es] Herramientas para leer y validar datos almacenados siguiendo la norma 43 del Consejo Superior Bancario (CSB) / Asociación Española de Banca (CSB).
Tools for converting from the Spanish banks' format CSB norm 43 (CSB43).
Convert a CSB/AEB norm 43 file to other file formats.
Supported formats:
Additional formats are optionally provided by tablib
:
For an exhaustive list, see package tablib
.
usage: csb2format [-h] [-v] [-s] [--no-sepa] [-df] [-d DECIMAL] [-e ENCODING] [--use-float] [-V]
[-f {csv,dbf,homebank,html,jira,json,latex,ods,ofx,ofx1,rst,tsv,xls,xlsx,yaml}] [-E OUTPUT_ENCODING]
csb_file converted_file
Convert a CSB43 file to another format
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
csb43 arguments:
csb_file a csb43 file ('-' for stdin)
-s, --strict strict mode (default: False)
--no-sepa do not convert items to SEPA transfers or direct debits (default: True)
-df, --dayfirst use DDMMYY as date format while parsing the csb43 file instead of YYMMDD (default: True)
-d DECIMAL, --decimal DECIMAL
set the number of decimal places for the money amount type (default: 2)
-e ENCODING, --encoding ENCODING
set the input encoding ('cp850' for standard AEB file) (default: latin1)
--use-float export monetary amounts using binary floating point numbers as a fallback (default: str)
-V, --verbose show csb43 warnings (default: True)
output arguments:
converted_file destination file ('-' for stdout)
-f {csv,dbf,homebank,html,jira,json,latex,ods,ofx,ofx1,rst,tsv,xls,xlsx,yaml}, --format {csv,dbf,homebank,html,jira,json,latex,ods,ofx,ofx1,rst,tsv,xls,xlsx,yaml}
format of the output file (default: ofx)
-E OUTPUT_ENCODING, --output-encoding OUTPUT_ENCODING
set the output encoding (default: utf-8)
Converting to OFX format:
$ csb2format transactions.csb transactions.ofx
$ csb2format --format ofx transactions.csb transactions.ofx
or
$ csb2format transactions.csb - > transactions.ofx
From another app to file
$ get_my_CSB_transactions | csb2format - transactions.ofx
Converting to XLSX spreadsheet format:
$ csb2format --format xlsx transactions.csb transactions.xlsx
Using cp850 as the input encoding:
$ csb2format --encoding cp850 --format xlsx transactions.csb transactions.xlsx
ODS, XLS and XLSX files are generated as books, with the first sheet containing the accounts information, and the subsequent sheets containing the transactions of each one of the accounts.
Parse a CSB43 file and print the equivalent OFX file
# OFX
from csb43.ofx import converter as ofx_converter
from csb43.aeb43 import read_batch
with open("movimientos.csb", "rb") as fd:
batch = read_batch(fd)
# print to stdout
print(ofx_converter.convert_from_aeb43(batch))
Parse a CSB43 file and print the equivalent in a tabular or dictionary-like file format
from csb43 import read_batch, formats
with open("movimientos.csb", "rb") as fd:
batch = read_batch(fd)
# print 'yaml' format to stdout
o = formats.convert_from_aeb43(batch, 'yaml')
print(o.yaml)
# write 'xlsx' format to file
o = formats.convert_from_aeb43(batch, 'xlsx')
with open("movimientos.xlsx", "wb") as f:
f.write(o.xlsx)
Build an AEB43 with a custom context:
import dataclasses
from csb43 import read_batch, get_current_context
# custom context
ctx = dataclasses.replace(get_current_context(), strict=True)
with open("movimientos.csb", "rb") as fd:
batch = read_batch(fd, context=context)
# scoped context
with get_current_context().scoped(strict=True):
with open("movimientos.csb", "rb") as fd:
batch = read_batch(fd)
Basic functionality (conversion to json, homebank and OFX)
$ pip install csb43
Conversion to YAML
$ pip install csb43[yaml]
Conversion to basic Tablib formats
$ pip install csb43[basic_formats]
Conversion to all Tablib formats
$ pip install csb43[formats]
Conversion to all supported formats
$ pip install csb43[all]
csb43.aeb43
: CSB43 reimplemented using field descriptors:
csb43.csb43
has been deprecated and it will be removed in a future version (and every package object that use it).setup.py
to pyproject.toml
yaml
and formats
(thanks to Sergi Almacellas & Cédric Krier).simplejson
dependency.date
instead of datetime
(thanks to Sergi Almacellas).Decimal
instead to float
in order to prevent representation and rounding issues. These fields are exported as a string by default, conversion to float is optional (thanks to Sergi Almacellas & Cédric Krier).openpyxl < 2.5.0
to prevent issue while trying to export to xlsx.tablib
backend supported in python 3.FAQs
Parsing and validation utilites for the Spanish standard norm 43 by the 'Consejo Superior Bancario' (CSB) / 'Asociación Española de Banca' (AEB) for storing bank account transactions | [es] Herramientas para leer y validar datos almacenados siguiendo la norma 43 del Consejo Superior Bancario (CSB) / Asociación Española de Banca (CSB).
We found that csb43 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.