Metadata-Version: 2.4
Name: bbva2pandas
Version: 1.2.0
Summary: Parse BBVA monthly reports directly to a Dataframe
Home-page: https://github.com/ablancolopez/bbva2pandas
Author: Alejandro Blanco López
Author-email: alexbl1996@gmail.com
License: GPLv3+
Keywords: bbva pdf bank regex
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Office/Business :: Financial :: Accounting
Classifier: Typing :: Typed
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas==2.2.3
Requires-Dist: numpy==1.26.4
Requires-Dist: pdftotext==2.2.2
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# BBVA reports extractor
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Made with Python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)

Library + script to extract your bank account movements from the pdf reports that BBVA provides each month. Export it to csv or sqlite.

## Dependencies

The following libpoppler dependencies are needed for pdftotext:

```bash
sudo apt install build-essential libpoppler-cpp-dev pkg-config python3-dev
```

## Downloading the reports

In [bbva.es](https://bbva.es), login and go to Posición global > Cuentas y Tarjetas > Ficha. Then click Operaciones > Extracto mensual cuentas. Ready to go!

## Using the libray

Just provide the filepath:

```python
import bbva2pandas
dataframe = bbva2pandas.Report('myfile').to_df()
```


## Running the script

The provided script loads all the PDFs in the provided directory and generates a CSV/sqlite file
```
usage: bbva2pandas [-h] [--output_filename OUTPUT_FILENAME] directory {csv,sqlite}
bbva2pandas: error: the following arguments are required: directory, output_format
```

## Docker

Build and run with Docker (no local dependencies required):

```bash
# Build the image
make build

# Run on PDFs in the current directory
make run

# Run tests
make test

# Or use docker directly:
docker run --rm -v "$PWD:/data" bbva2pandas /data csv
```

## Testing

```bash
# Locally
python3 -m unittest discover tests

# With Docker
make test
```
