Name | canatax JSON |
Version |
1.3.0
JSON |
| download |
home_page | https://github.com/firstflush/canatax |
Summary | An easy-to-use, dependency-free Canadian sales and income tax calculator. |
upload_time | 2024-08-25 06:24:55 |
maintainer | None |
docs_url | None |
author | Michael Pearce |
requires_python | >=3.10 |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Canatax: The Canadian Tax Calculator

**Note:** This package is currently in development. Expect frequent updates and potential breaking changes.
**Canatax** is a simple and straightforward package for calculating Canadian sales or income taxes based on the current year's rates. Whether you need to calculate federal and provincial income taxes, CPP, EI, or estimate GST/PST/HST across different provinces and territories, Canatax provides an easy-to-use interface with no additional dependencies.
## Features
- **Income Tax Calculation:**
- **Current Year Rates:** Calculates taxes based on the most up-to-date rates for the current year.
- **Federal and Provincial Taxes:** Automatically determines federal and provincial taxes based on your income and province.
- **CPP and EI Deductions:** Includes Canada Pension Plan (CPP) and Employment Insurance (EI) deductions in the calculation.
- **After-Tax Income:** Provides your net income after all deductions.
- **Sales Tax Estimation:**
- **Provincial and Territorial Rates:** Estimates GST, PST, and HST for all Canadian provinces and territories.
- **Customizable Inputs:** Allows for quick calculations with adjustable amounts and locations.
## Installation
You can install Canatax via pip:
```bash
pip install canatax
```
## Usage
### Income Tax Calculation with the `IncomeTaxCalculator` Class
Use the `IncomeTaxCalculator` class to calculate your income taxes:
```python
from canatax import IncomeTaxCalculator
# Example income and province
income = 80000
province = "AB"
# Calculate tax estimate
estimate = IncomeTaxCalculator.calculate(income=income, province=province)
# Or create an instance of TaxCalculator, if you prefer
calculator = IncomeTaxCalculator(income=income, province=province)
income_estimate = calculator.calculate_all()
# Output the results
print(estimate.federal_tax)
print(estimate.provincial_tax)
print(estimate.cpp)
print(estimate.ei)
print(estimate.total_tax)
print(estimate.after_tax_income)
```
### Sales Tax Calculation with the `SalesTaxCalculator` Class
Use the `SalesTaxCalculator` class to calculate sales taxes:
```python
from canatax import SalesTaxCalculator
# Example amount and province
amount = 100.00
province = "BC"
# Calculate sales tax estimate
sales_estimate = SalesTaxCalculator.quick_calc(amount=amount, province=province)
# Or create an instance of SalesTaxCalculator
sales_tax_calculator = SalesTaxCalculator(province=province)
sales_estimate = sales_tax_caluclator.calculate()
# Output the results
print(sales_estimate.gst_total)
print(sales_estimate.pst_total)
print(sales_estimate.hst_total)
print(sales_estimate.tax_total)
print(sales_estimate.after_tax_total)
```
## Roadmap
- **Additional Features:**
- Expand support for retroactive tax calculations for previous years.
- Increase testing
- Add more detailed documentation and usage examples.
## Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.
Raw data
{
"_id": null,
"home_page": "https://github.com/firstflush/canatax",
"name": "canatax",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Michael Pearce",
"author_email": "firstflush@protonmail.com",
"download_url": "https://files.pythonhosted.org/packages/a8/76/b3be32cdef66b50d57e02ce2351141e8a972cb0335d5d95e15e84bc1748b/canatax-1.3.0.tar.gz",
"platform": null,
"description": "# Canatax: The Canadian Tax Calculator\n\n\n\n**Note:** This package is currently in development. Expect frequent updates and potential breaking changes.\n\n**Canatax** is a simple and straightforward package for calculating Canadian sales or income taxes based on the current year's rates. Whether you need to calculate federal and provincial income taxes, CPP, EI, or estimate GST/PST/HST across different provinces and territories, Canatax provides an easy-to-use interface with no additional dependencies.\n\n## Features\n\n- **Income Tax Calculation:**\n - **Current Year Rates:** Calculates taxes based on the most up-to-date rates for the current year.\n - **Federal and Provincial Taxes:** Automatically determines federal and provincial taxes based on your income and province.\n - **CPP and EI Deductions:** Includes Canada Pension Plan (CPP) and Employment Insurance (EI) deductions in the calculation.\n - **After-Tax Income:** Provides your net income after all deductions.\n\n- **Sales Tax Estimation:**\n - **Provincial and Territorial Rates:** Estimates GST, PST, and HST for all Canadian provinces and territories.\n - **Customizable Inputs:** Allows for quick calculations with adjustable amounts and locations.\n\n## Installation\n\nYou can install Canatax via pip:\n\n```bash\npip install canatax\n```\n\n## Usage\n\n### Income Tax Calculation with the `IncomeTaxCalculator` Class\n\nUse the `IncomeTaxCalculator` class to calculate your income taxes:\n\n```python\nfrom canatax import IncomeTaxCalculator\n\n# Example income and province\nincome = 80000\nprovince = \"AB\"\n\n# Calculate tax estimate\nestimate = IncomeTaxCalculator.calculate(income=income, province=province)\n\n# Or create an instance of TaxCalculator, if you prefer\ncalculator = IncomeTaxCalculator(income=income, province=province)\nincome_estimate = calculator.calculate_all()\n\n# Output the results\nprint(estimate.federal_tax)\nprint(estimate.provincial_tax)\nprint(estimate.cpp)\nprint(estimate.ei)\nprint(estimate.total_tax)\nprint(estimate.after_tax_income)\n```\n\n\n### Sales Tax Calculation with the `SalesTaxCalculator` Class\n\nUse the `SalesTaxCalculator` class to calculate sales taxes:\n\n```python\nfrom canatax import SalesTaxCalculator\n\n# Example amount and province\namount = 100.00\nprovince = \"BC\"\n\n# Calculate sales tax estimate\nsales_estimate = SalesTaxCalculator.quick_calc(amount=amount, province=province)\n\n# Or create an instance of SalesTaxCalculator\nsales_tax_calculator = SalesTaxCalculator(province=province)\nsales_estimate = sales_tax_caluclator.calculate() \n\n# Output the results\nprint(sales_estimate.gst_total)\nprint(sales_estimate.pst_total)\nprint(sales_estimate.hst_total)\nprint(sales_estimate.tax_total)\nprint(sales_estimate.after_tax_total)\n```\n\n## Roadmap\n\n- **Additional Features:**\n - Expand support for retroactive tax calculations for previous years.\n - Increase testing\n - Add more detailed documentation and usage examples.\n\n## Contributing\n\nContributions are welcome! Please submit a pull request or open an issue to discuss your ideas.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An easy-to-use, dependency-free Canadian sales and income tax calculator.",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/firstflush/canatax"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b7f95ff633d9063ac8cb68767a82483129b961b1c2e62f35b286a4178a9725ac",
"md5": "74e4138c34deac4357ba5350afcac7d0",
"sha256": "abd90ce4dfd54c65ca81e12942b96aef4bc03e7f565fb45eba4bc6778e799ba9"
},
"downloads": -1,
"filename": "canatax-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "74e4138c34deac4357ba5350afcac7d0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 13493,
"upload_time": "2024-08-25T06:24:52",
"upload_time_iso_8601": "2024-08-25T06:24:52.007544Z",
"url": "https://files.pythonhosted.org/packages/b7/f9/5ff633d9063ac8cb68767a82483129b961b1c2e62f35b286a4178a9725ac/canatax-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a876b3be32cdef66b50d57e02ce2351141e8a972cb0335d5d95e15e84bc1748b",
"md5": "e719bb3f2c0da2411d0b2b629a4c26ee",
"sha256": "497645c3db56dbbe74d98e465cf78abc5797fc5e8efa4813a80f1c1db67f4b17"
},
"downloads": -1,
"filename": "canatax-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "e719bb3f2c0da2411d0b2b629a4c26ee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 9304,
"upload_time": "2024-08-25T06:24:55",
"upload_time_iso_8601": "2024-08-25T06:24:55.598779Z",
"url": "https://files.pythonhosted.org/packages/a8/76/b3be32cdef66b50d57e02ce2351141e8a972cb0335d5d95e15e84bc1748b/canatax-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-25 06:24:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "firstflush",
"github_project": "canatax",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "canatax"
}