Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. def set_client():
  2. username = 'abc'
  3. password = '123'
  4.  
  5.  
  6. api = APIClient(username, password)
  7. return api
  8.  
  9. def get_client(api):
  10. api = set_client(api)
  11. if not api.session_token:
  12. api.login()
  13. return api
  14.  
  15. @shared_task()
  16. def mb_account_bal():
  17.  
  18. api = get_client(api)
  19. r = api.account.get_account(balance_only=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement