Welcome to the Bank CLI tool! This is a simple command-line tool that allows you to interact with a virtual bank account. You can deposit money, withdraw money, and check your balance—all from the terminal!
- Python (version 3.6 or higher recommended)
- pip (usually comes with Python)
Make sure your files and directories are structured like this:
mybanktool/
|-- bank_cli/
| |-- __init__.py
| `-- bank_cli.py
`-- setup.py
- mybanktool/: This is the main folder where everything resides.
- bank_cli/: A sub-folder which will contain the main logic of our tool.
- init.py: An empty file that tells Python that
bank_cli/should be treated as a package or module. - bank_cli.py: This is where the bank logic resides (like depositing, withdrawing, etc.).
- setup.py: A special script that helps package our tool so you can use it from the terminal.
To install the tool:
- Open your terminal or command prompt.
- Navigate to the
mybanktool/directory using thecdcommand:cd path/to/mybanktool/ - First, uninstall any previous versions of the tool:
pip uninstall bank-cli
- Then, install the tool:
pip install .
Congratulations! The bank tool is now installed.
With the tool installed, you can now use it directly from the terminal. Here's how:
-
Check Balance:
bank get_balance
This will show you the current balance in your virtual bank account.
-
Deposit Money:
bank deposit 100
This will deposit $100 into your account.
-
Withdraw Money:
bank withdraw 50
This will withdraw $50 from your account.
That's it! Enjoy managing your virtual finances!
Note: This is a basic guide and the tool itself is quite simple. In a real-world scenario, you'd probably want features like persistent storage, user accounts, and more. But this guide is meant to get you started with the basics.