Skip to main content

Utility functions for the CareCash expense tracker

Project description

expenseutils

Utility functions for the CareCash expense tracker — a cloud-based personal finance app built on AWS.

Functions

summarise(expenses)

Groups a list of expense dictionaries by category and returns a dict of {category: total}.

from expenseutils import summarise

expenses = [
    {'category': 'Food', 'amount': 20.0},
    {'category': 'Transport', 'amount': 10.0},
    {'category': 'Food', 'amount': 15.0},
]
print(summarise(expenses))
# {'Food': 35.0, 'Transport': 10.0}

check_budget(monthly_total, budget)

Returns a status dict based on spending vs budget.

from expenseutils import check_budget

result = check_budget(85.0, 100.0)
# {'status': 'warning', 'message': 'You are close to your budget limit.'}

Status values: ok, warning, exceeded

Installation

pip install expenseutils

Author

Amirthavarshini M — MSc Cloud Computing, NCI Dublin

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

expenseutils-1.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

expenseutils-1.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file expenseutils-1.0.1.tar.gz.

File metadata

  • Download URL: expenseutils-1.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.18

File hashes

Hashes for expenseutils-1.0.1.tar.gz
Algorithm Hash digest
SHA256 56442ba860a72c5fb72bb3951653cb9b890d767ab9c2641bb59c3d47ff09c52e
MD5 e61049755e762716d75ed3f063b0cb22
BLAKE2b-256 7832df9a5ae1d563d13b6e254101d95e9c4e780fe4b807b697654d94dfdf7429

See more details on using hashes here.

File details

Details for the file expenseutils-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: expenseutils-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.18

File hashes

Hashes for expenseutils-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83446ee542959458cbc15b5c325ca6e06b9776e768d966d16477d79c86d07ddb
MD5 84cd0aa8b4ee7a7e60b611fbf80aadfd
BLAKE2b-256 d6add919e203b3d8fe72493d3e822db798225157f6471fd2d6b147518382362f

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