Created
December 3, 2018 13:25
-
-
Save leogregianin/9700dd0eda2d5a3f0e9670bf89b91dd8 to your computer and use it in GitHub Desktop.
JSON export Nubank and NuConta transactions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pynubank import Nubank | |
import json | |
# Login | |
nu = Nubank('number_id', 'password') | |
# Credit card | |
card_statements = nu.get_card_statements() | |
with open(f'nubank.json', 'w+', encoding='UTF-8') as f: | |
json.dump(card_statements, f, sort_keys=True, indent=2, ensure_ascii=False) | |
# NuConta | |
account_statements = nu.get_account_statements() | |
with open(f'nuconta.json', 'w+', encoding='UTF-8') as f: | |
json.dump(account_statements, f, sort_keys=True, indent=2, ensure_ascii=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment