Calculate Dutch road tax Motorrijtuigenbelasting(MRB) for vehicles.
Project description
Motorrijtuigenbelasting: Dutch Road Tax Calculator
Motorrijtuigenbelasting is a Python library designed to calculate Dutch road taxes (motorrijtuigenbelasting, MRB) for passenger cars, motorcycles, and other vehicle types. It provides tools for determining taxes based on weight, fuel type, and provincial rates between 2015 and 2024. Future years will be added once the inflation numbers are in from the Belastingdienst.
Features
- Support for multiple energy sources (benzine, diesel, LPG, electric, etc.)
- Handles tax calculations based on weight brackets and provincial multipliers.
- Adjustable tax parameters for future tax years.
- Lightweight and extensible for different vehicle types like cars and motorcycles.
Table of Contents
Installation
Requirements
- Python 3.7 or higher.
pip install motorrijtuigenbelasting
or clone the repository and install dependencies:
git clone https://github.com/VitoMinheere/motorrijtuigenbelasting.git
cd motorrijtuigenbelasting
pip install -r requirements.txt
Usage
Example
Here’s how to use MRB-Py to calculate road tax for a passenger car:
from motorrijtuigenbelasting import Car, EnergySource
# Define car details
car = Car(weight=1200, energy_source=EnergySource.BENZINE, manufacturing_year=2024)
# Calculate total tax for Noord-Holland province in 2024
province = "noord-holland"
year = 2024
tax = car.calculate_total_tax(province, year)
print(f"Total tax for your car: €{tax}")
Supported Vehicle Types
Passenger Cars
Supports fuel types like benzine, diesel, LPG, LPG G3, and electric vehicles.
Oldtimer & kwarttarief ruling
Added the oldtimer & kwarttarief rulings and their maximum amounts.
Motorcycles
Rules for base tax and opcenten added. Added sources to the information in the docstring.
Other
Other vehicles types are being worked on in the following order:
- Diesel
- Benzine with low emissions
- Business Van
- Camper
- Trucks
Contributing
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Write clear code and include tests.
- Submit a pull request with a detailed description of your changes.
Issues and Feature Requests
Found a bug or have an idea for a new feature? We’d love to hear from you!
- Go to the Issues tab of the repository.
- Click New Issue.
- Provide a detailed description, including steps to reproduce the issue or a clear explanation of your feature idea.
Running Tests
Use unittest to run tests:
python -m unittest discover -s tests
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
Feel free to reach out for support or feedback:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file motorrijtuigenbelasting-0.1.0.tar.gz.
File metadata
- Download URL: motorrijtuigenbelasting-0.1.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5bc9fd28530bc489506dc84aa977330e48bc53f579575391dfe4e75230e7507
|
|
| MD5 |
020c5c452ed3bcb793e4e3ecb1ddb7ee
|
|
| BLAKE2b-256 |
14612bbf68fd28d436b6f8fa909d9798e526dc34e9a9c4a8bb10e216b51997e4
|
File details
Details for the file motorrijtuigenbelasting-0.1.0-py3-none-any.whl.
File metadata
- Download URL: motorrijtuigenbelasting-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5553ef1d7785281d10799d289347edbd82fee351248fcc0abd0eb3d53c17214b
|
|
| MD5 |
1a687cb8d7512dd233c59faf047dfe27
|
|
| BLAKE2b-256 |
52953d86e37f3f397e70c8894fba057ec50f99471fa272c6aef32767287bced9
|