Skip to main content

Simple functions for bank operation

Project description

SIMPLE BANK PACKAGE

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.3.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.3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simple_bank_package-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 8a59ff88bc24470b975f1a301cb1b7ad76523c5a395db51849bb88b9d6123dd1
MD5 bd74425ceb003ff28f52c87aefd6bfa7
BLAKE2b-256 8cb19d8e8cbac271be4de217cf4b2cc77015f8a1393587de9f0c139cb07f367b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simple_bank_package-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 866165cd4e4f85a73b15284536384e26d987bfd2f5422d1e658af133626ca7f0
MD5 352774af87a4f1278a5f10bea8a37368
BLAKE2b-256 a3b5f35bb2350fe1fba8bb517666f270f698ec5ec4c1e0e35e91155cace7aaac

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