Recent Blog Posts UI

Working Credit Cards Numbers 2015

people working in the office free stock photo banco de imagens açao bebida debate o negócio alegre colegas free images building industry solar energy site labor panel free images man people color helmet job construction worker free images work man person group people restaurant asian workers in belgium can now switch to a four day week but they won t free images building construction vehicle machine factory working from your c spot boosts career success and happiness yahoo sete dicas para trabalhar em home office dece hub de design e meeting thursday thoughts scholarly voice and tone study proletariatas vikipedija chef sharpens knife with steel freestock videos free images work hand man person technology guy conversation man adult businessman free vector graphic on pixabay italians global boston library clipart team at work toddler playing free stock photo public domain pictures svg people work business team free svg image icon svg silh maintaining company culture with a remote workforce management working memory wikipedia free images work silhouette light white building monument free images work hand creative bokeh blur technology camera working shire horse free stock photo public domain pictures horse shoe brewery wikipedia svg work workplace planning strategy free svg image icon svg silh free images prairie nomad herd ranch desert landscape grassland file blacksmith working jpg wikimedia commons

:
Produc Overview Slide Examples
committed
Update the CLI tool to better showcase the API usage
1 parent Letter Of Intent Template Free commit 385218d

People working in the office free stock photo 1 file changed Apple Product Launch In Person Event

Lines changed: 34 additions & 10 deletions

Journal Vs Blog Working Credit Cards Numbers 2015

creditagricole/cli.py

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
# coding: utf-8
22

3+
"""
4+
This Command Line Interface only aims to showcase how this library can be used.
5+
It doesn't do anything useful.
6+
"""
7+
38
import os
49
import argparse
510
from getpass import getpass
611

7-
from creditagricole.api import CreditAgricole
12+
from creditagricole.api import CreditAgricole, CreditAgricoleException
813
from creditagricole import CA_COUNTRIES
914

1015
def parse_cli() -> argparse.Namespace:
@@ -16,8 +21,8 @@ def parse_cli() -> argparse.Namespace:
1621
args = parser.parse_args()
1722
return args
1823

19-
def main() -> None:
20-
args = parse_cli()
24+
def summary(country: str, region: str) -> None:
25+
ca = CA_COUNTRIES[country](region) # type: CreditAgricole
2126

2227
try:
2328
user_id = os.environ["CA_USER_ID"]
@@ -29,19 +34,38 @@ def main() -> None:
2934
except KeyError:
3035
pin_code = getpass("Pin code: ")
3136

32-
ca = CA_COUNTRIES[args.country](args.region) # type: CreditAgricole
3337
ca.login(user_id, pin_code)
34-
35-
print("Accounts:")
36-
for account in ca.accounts:
37-
print(account)
3838
print()
3939

40-
print("Loans:")
40+
print("LOANS")
41+
print("-" * 50)
4142
for loan in ca.loans:
4243
print(loan)
4344
print()
4445

45-
print("Insurances:")
46+
print("INSURANCES")
47+
print("-" * 50)
4648
for insurance in ca.insurances:
4749
print(insurance)
50+
print()
51+
52+
print("ACCOUNTS")
53+
print("-" * 50)
54+
55+
for account in ca.accounts:
56+
print(account)
57+
print()
58+
59+
print("Last transactions:")
60+
for operation in account.operations[:5]:
61+
print(operation)
62+
63+
print("-" * 50)
64+
65+
def main() -> None:
66+
args = parse_cli()
67+
68+
try:
69+
summary(args.country, args.region)
70+
except CreditAgricoleException as cae:
71+
print(f"[ERROR] {cae}")

New Company Portal Launch Announcement Email Template Working Credit Cards Numbers 2015

Comments
 (0)