# Python CSV checker

Check a spreadsheet of suppliers in one command. The script from the Invoice Verification Toolkit runs on your computer and adds a result for each row alongside the original columns.

![A spreadsheet with company IDs and amounts goes in. The result CSV distinguishes checked rows from pending ones.](https://alertviz.com/hub/guides/python-csv/en.png)

## How to use it

1. Create a comma-separated UTF-8 file called invoices.csv with the header `ico,amount,currency`. Add `00094943,100,CZK` as your test row. Store company IDs as text in your spreadsheet.
2. Run the command below from the folder containing the script and input file. To compare an account, add `bank_account` or `iban`. For a dated exchange rate add `duzp` in DD.MM.YYYY format.
3. Filter the output by `checkStatus`. For checked rows, read `accountCheck` and `riskFlags`. For unfinished rows, read `pendingReason`.

## Try it

```sh
python3 batch_kyb_verify.py invoices.csv results.csv
```

## Reading the result

Exit code 2 means some rows are pending. Keep the input and the adjacent .progress.json file. When the lookup is available again, rerun the same command with `--resume` at the end. Set `EUROKYB_API_KEY` to use a subscription.

[Open the tool](https://climealert.gumroad.com/l/rtksjq)
