Skip to main content

gamebanking is a module that makes coding currency in games easier.

Project description

gamebanking

gamebanking is a Python module that makes coding game currency easier. It allows you to create accounts, deposit and withdraw currency, transfer money, track transaction history, and manage accounts.

Functions

  • create(number) - Creates a new account with the given number. Returns True if successful, False if the account already exists.
  • deposit(number, amount) - Adds currency to the given account. Returns True if successful, False if the account does not exist. Logs the transaction in the account’s history.
  • withdraw(number, amount) - Subtracts currency from the given account. Returns True if successful, False if the account does not exist or has insufficient funds. Logs the transaction in the account’s history.
  • balance(number) - Returns the current balance of the given account. Returns False if the account does not exist.
  • transfer(number1, number2, amount) - Moves currency from one account to another. Returns True if successful, False if accounts are invalid or the source account lacks funds. Both accounts’ histories are updated.
  • reset(number) - Resets the balance of the given account to 0. Returns True if successful, False if the account does not exist.
  • resetall() - Resets all accounts’ balances to 0.
  • delete(number) - Deletes a single account. Returns True if successful, False if the account does not exist.
  • deleteall() - Deletes all accounts.
  • history(number) - Returns a list of all transactions for the given account. Returns an empty list if no transactions exist. Returns False if the account does not exist.

Author

CorruptDragon24

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

gamebanking-1.1.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

gamebanking-1.1.0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file gamebanking-1.1.0.tar.gz.

File metadata

  • Download URL: gamebanking-1.1.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for gamebanking-1.1.0.tar.gz
Algorithm Hash digest
SHA256 45032a1c54609197a41abf57421addcf501db28c7f1d3da8b127983472bab94f
MD5 f07bf5a20033720e2ee96c013d8be1ef
BLAKE2b-256 67a867424b17d451b912511eebc67d8f1674a1444607eab9b5aa4101702f31a2

See more details on using hashes here.

File details

Details for the file gamebanking-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: gamebanking-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for gamebanking-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb8624fc935793809ab36a3503277538865b78d65404240394a77c7b76977780
MD5 333a4279e667551cd7e70997c60f9b09
BLAKE2b-256 41f3e0d86654c466d89faeb84dde6d3e39f26013a66d3cf41357239daed79cd1

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