Skip to main content

net income calculator for Portugal

Project description

saldo

PyPI Tests Changelog License

calculate taxes to pay and net salary if you're a portuguese worker. Keep track of your balance (or "saldo")!

What is the point

Knowing how much money will land in your bank account in Portugal is hard. There are multiple scenarios to consider and they are not very clear. There are good simulators out there (such as Doutor Finanças for B category employees and my remote freelancer tool).

However, there's no open-source library to do this logic. It's also not that easy to find out what Doutor Finanças does under the hood.

This library intends to fill this gaps: provide a community driven open source tool to calculate taxes and net income for any given scenario. It would also provide documentation both for best practies for development but also to just understand how the logic works.

Some possible use cases:

  • I got a new job (freelancer or not) and want to know how much I'll pay as taxes and how much I'll recieve in my bank account.
  • I have a small company and don't want to use licensing software to process payments.
  • I'm an accountant. I want to validate my excel with a open and clear tool, where I can see exactly what it does.
  • I just want to understand how the tax logic works in Portugal and simulate a few different scenarios.
  • I have a tool in google sheets to analyse my profits and want to offset some of this net salary logic to a trusted tool (this would require an API using this library).

Installation

Install this library using pip:

pip install saldo

Usage

Current status

This is a work in progress. The basic functionalities implemented are:

  • simulator.py/simulate_dependent_worker calculates the net salary and taxes to pay for a dependent worker (category A). For now, it's limited for:
    • single person
    • 0 dependentes
    • living in Continental Portugal
    • lunch allowence in cupons (or non existing)

Features

The questions to answer with this library are:

  • For a given salary, what is my net income?
  • How much taxes will I have to pay?
  • What if I recieve the holiday and christmas subsidies in twelfths? How much does it change?
  • By the end of the year, what will be my gross and net salary?
  • How much money will I pay/recieve when declaring IRS in April?
  • What if I'm an independent worker?
  • What about IVA?

So the feature planing is:

  • implement a complete calculator for A Category workers that answers all the points above
  • do it for B Category workers as well
  • Write documentation on how to use it
  • Write documentation about how this calculation works, with iteractive parts - the user can change their income and the explanation changes as well. Might use pyodide for that or just have this in javascript?

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd saldo
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

python -m pip install -e '.[test]'

To run the tests:

python -m pytest

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

saldo-0.1.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

saldo-0.1.2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file saldo-0.1.2.tar.gz.

File metadata

  • Download URL: saldo-0.1.2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.19.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for saldo-0.1.2.tar.gz
Algorithm Hash digest
SHA256 320c5dfd09fd85377506674e4cebe3040878eb772c867bdb6a3fa668131df84f
MD5 5306bab71984ba533ade76a34f368bc3
BLAKE2b-256 582809dc1dbcd26939f56bda5cd7eafb523804fae6a8c4c8f55fe059e25ad99d

See more details on using hashes here.

File details

Details for the file saldo-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: saldo-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.19.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for saldo-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d04cbd1ec5a57620d8482762fae0735a0dcf45b44fdcdab02add369934f8e3b1
MD5 afc88658cfdc6d8c3d2be5682c4f5e90
BLAKE2b-256 3fc4fa1f2ec6c16ef387696f70b2377757474ddf183a8d28da4b42e0a15cc822

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page