Skip to content

A mini project written in Python , showcasing the use of modern tools and best practices in software development.

Notifications You must be signed in to change notification settings

Kinetics20/intro_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5f6124a Β· Jan 3, 2025

History

49 Commits
Jan 3, 2025
Dec 9, 2024
Jan 2, 2025
Dec 11, 2024
Dec 12, 2024
Dec 9, 2024
Dec 10, 2024
Dec 10, 2024
Dec 11, 2024
Dec 11, 2024
Dec 11, 2024
Dec 9, 2024
Jan 1, 2025
Jan 3, 2025
Dec 12, 2024
Dec 11, 2024

Repository files navigation

Intro_project πŸŽ‰

Python PyCharm Ubuntu Kali Linux

A mini project written in Python 3.12, showcasing the use of modern tools and best practices in software development.
This project utilizes:

  • Poetry πŸ› οΈ – for virtual environment and dependency management,
  • mypy βœ… – for static type checking,
  • pytest πŸ§ͺ – for unit testing.

Project Overview πŸ“š

The project implements a simple BankAccount class with the following functionalities:

  • Creating a bank account with an initial balance,
  • Depositing and withdrawing funds,
  • Handling errors, such as trying to withdraw more money than available.

The project also includes unit tests to ensure code correctness.

Requirements πŸ–₯️

  • Python 3.12+
  • Poetry 1.6.1 or newer
  • mypy 1.5.0 or newer
  • pytest 7.0.0 or newer

Installation πŸš€

1. Clone the repository:

git git@github.com:Kinetics20/intro_project.git
cd intro_projekt

2. Install dependencies using Poetry:

poetry install

3. Activate the virtual environment:

# Linux/macOS
poetry shell
# Windows (Command Prompt or PowerShell)
poetry shell

4. Install mypy for static type checking:

# Linux/macOS
pip install mypy

# Windows (Command Prompt or PowerShell)
pip install mypy

5. Install pytest for running tests:

# Linux/macOS
pip install pytest

# Windows (Command Prompt or PowerShell)
pip install pytest

Running Tests πŸ§ͺ

pytest

Type Checking βœ…

mypy bank_account.py

Features πŸ”§

BankAccount Class

  • __init__(owner: str, account_number: str, balance: Decimal = Decimal("0.0")) -> None
    Creates a bank account.

  • deposit(amount: Decimal) -> None
    Deposits funds into the account (only positive amounts are allowed).

  • withdraw(amount: Decimal) -> None
    Withdraws funds from the account (the amount cannot exceed the current balance).

  • get_balance() -> str
    Returns the balance formatted as "xx.xx PLN".

Contribution 🀝

Feel free to submit pull requests with improvements and suggestions.
This project was created for educational purposes and to improve Python skills! 🌟

About

A mini project written in Python , showcasing the use of modern tools and best practices in software development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages