Skip to main content

Simple functions for bank operation

Project description

SIMPLE BANK PACKAGE

Description. The package simple-bank-package is used to: - Simulate a simple bank system - There are bank operation functions and account register functions Functions: - account.register_user(cpf = string, name = string, birth_date = string, address = string, users = list of dict) -> return users (adding a new user) - new user = { "cpf": cpf, "name": name, "birth_date": birth_date, "address": address } - account.create_account(cpf = string, users = list of dict, accounts = list of dict) -> return accounts (adding a new account) - new account = { "agency": "0001", "account_number": len(accounts)+1, "user": user, "balance": 0, "bank_statement": "", "withdraw_number": 0 } - bank_operations.deposit(account = dict, value = float / positional only arguments) -> return account (with operation executed) - bank_operations.withdraw(account = dict, value = float, limit = float, withdraw_limit = interger / keyword only arguments) -> return account (with operation executed) - limit = maximum value for withdraw operation - withdraw_limit = maximum number of withdraws allowed - bank_operations.statement(account = dict / keyword only argument) -> print the account statement

Installation

Use the package manager pip to install simple-bank-package

pip install simple-bank-package

Usage

from simple_bank import account, bank_operations
users=[]
accounts=[]
account.register_user('000.000.000-00', 'Client_name', 'DD/MM/YYYY', 'Client_address', users)
print(users[0]["name"])
account.create_account('000.000.000-00', users, accounts)
print(accounts[0]["account_number"])
bank_operations.deposit(accounts[0], 100.00)
bank_operations.withdraw(account = accounts[0], value = 50, limit = 500, withdraw_limit = 3)
bank_operations.statement(account = accounts[0])

Author

Rafael Alves

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_bank_package-0.0.2.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_bank_package-0.0.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file simple_bank_package-0.0.2.tar.gz.

File metadata

  • Download URL: simple_bank_package-0.0.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for simple_bank_package-0.0.2.tar.gz
Algorithm Hash digest
SHA256 cd2008c91dafae649433a6a6a9410b5569c59a8bf55f9321734aab5589d6b385
MD5 f0e2f57751234ede1157023c1ec77366
BLAKE2b-256 2736b6f53c5c136226113d96b615fec2fb5905d348fb1cb6de39158614fe0118

See more details on using hashes here.

File details

Details for the file simple_bank_package-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_bank_package-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 064941560217e2e308b4f99bacdb0e2574223d1d5b2be98f081295beca87dbfe
MD5 4d88ebe4b726e11df493093be5ff04ca
BLAKE2b-256 87985867d15b83c4d1f7e19b884ae44433ea62babb31f9d3e3a0cc9f19cfad7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page