Skip to main content

pylascontrol. Package for personal financial management. Beta version for educational use.

Project description

Pylascontrol

A Python package for personal financial management and budget analysis.

Overview

Pylascontrol helps you manage and visualize your personal finances by loading budget data from Excel spreadsheets and generating insightful charts. It's designed for educational purposes and personal use.

Features

  • 📊 Load budget data from Excel files in matrix format
  • 📈 Generate multiple chart types (line, bar, balance)
  • 💰 Track income, expenses, and contributions
  • 📅 Organize data by month, category, and type
  • 🎨 Visualize financial trends with Matplotlib

Installation

pip install pylascontrol

Or install from source:

git clone https://github.com/rodrigoaraujorosa/pylascontrol.git
cd pylascontrol
pip install -e .

Requirements

  • Python >= 3.12
  • pandas
  • numpy
  • matplotlib
  • openpyxl

Usage

Loading Budget Data

import pylascontrol as pc

# Load budget data from Excel file
df = pc.load_budget_excel("personal_budget_example.xlsx", year=2025)

# View the data
print(df.head())

The function expects an Excel file with a sheet named "ORÇAMENTO PESSOAL" containing:

  • Months as columns (JAN, FEV, MAR, etc.)
  • Categories as rows
  • Monetary values in cells

Generating Charts

Line Chart (Income vs Expenses)

pc.plot_chart_by_type(df, year=2025, type="line")

Bar Chart (Side-by-side comparison)

pc.plot_chart_by_type(df, year=2025, type="bar")

Balance Chart (Monthly balance)

pc.plot_chart_by_type(df, year=2025, type="saldo")

Data Structure

Input Excel Format

Your Excel file must follow the format shown in personal_budget_example.xlsx:

  • Sheet name: Must be named "ORÇAMENTO PESSOAL"
  • Column headers (row 1): Month abbreviations (JAN, FEV, MAR, ABR, MAIO, JUN, JUL, AGO, SET, OUT, NOV, DEZ)
  • Row labels: Category groups and specific categories
  • Group labels (define transaction types):
    • RECEITA: Income categories
    • APORTES: Investment contributions
    • Other groups: Expense categories (e.g., DOMÉSTICAS, TRANSPORTE, ENTRETENIMENTO, SAÚDE, etc.)
  • Values: Numeric monetary values in the cells

Important: Developers must structure their spreadsheet according to this format for the package to work correctly. Refer to personal_budget_example.xlsx as a template.

Output DataFrame

The load_budget_excel function returns a DataFrame with the following columns:

  • ano: Year of the record
  • mes: Month number (1-12)
  • tipo: Type of transaction ('receita', 'despesa', 'aporte')
  • grupo: Category group (e.g., 'TRANSPORTE', 'ENTRETENIMENTO')
  • categoria: Specific category name
  • valor: Monetary value

Example

import pylascontrol as pc

# Load data
df = pc.load_budget_excel("personal_budget_example.xlsx", year=2025)

# Generate all chart types
pc.plot_chart_by_type(df, year=2025, type="line")
pc.plot_chart_by_type(df, year=2025, type="bar")
pc.plot_chart_by_type(df, year=2025, type="saldo")

License

MIT License - see LICENSE file for details

Author

Rodrigo de Araujo Rosa
Email: rodrigoaraujo.r@gmail.com
GitHub: rodrigoaraujorosa

Contributing

This is a beta version for educational purposes. Contributions, issues, and feature requests are welcome!

Disclaimer

This package is intended for personal and educational use. Always verify financial calculations and consult with financial professionals for important decisions.

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

pylascontrol-1.0.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

pylascontrol-1.0.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file pylascontrol-1.0.0.tar.gz.

File metadata

  • Download URL: pylascontrol-1.0.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for pylascontrol-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c0c24e220d43319150b18bd0450d04e8c1cbd19f423182d637ae5f7630b3c6b6
MD5 5704c5c7d8ac22fb9e047fd8b8b8b114
BLAKE2b-256 10168a4132f3fea66dc6350fc4ee4f7eb95436b4e2618ae7d9a208d2e0998458

See more details on using hashes here.

File details

Details for the file pylascontrol-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pylascontrol-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for pylascontrol-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bacdcbb46aa0d27f3876c2a99dc5705582fb6525dcfef8a4e2088f64a09a1740
MD5 98cacd083c0884ae0d310939e528ccca
BLAKE2b-256 2bbb8282daf4a50c34b17d6a13e646ad66eb301509bd17ef60c3aad02317c04b

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