nortax

A Python client for the tax table portion of the Norwegian tax authority's API.

https://github.com/lewiuberg/nortax

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

A Python client for the tax table portion of the Norwegian tax authority's API.

Basic Info
  • Host: GitHub
  • Owner: lewiuberg
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 39.1 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme Contributing License Citation

README.md

NorTax <!-- omit in toc -->

GitHub License Python PyPI Downloads Codecov code coverage Github Contributors GitHub search hit counter GitHub issues GitHub last commit

Copyright 2023 Lewi Lie Uberg\ Released under the MIT license

A Python client for the tax table portion of the Norwegian tax authority's API.

Usage

Using the NorTax package is easy. Just follow the steps below.

Import the Tax class from the nortax package

Python REPL:

python from nortax import Tax

Create a Tax object

Python REPL:

python tax = Tax( gross_income=25000, tax_table="7100", income_type="Pension", period="2 weeks", year=2022, )

Print the representation of the Tax object

Python REPL:

python print(repr(tax))

Output:

shell Tax(gross_income=25000, tax_table='7100', income_type='Pension', period='2 weeks', year=2022)

Change some attributes of the Tax object

Python REPL:

python tax.gross_income = 65625 tax.tax_table = "7107" tax.income_type = "Wage" tax.period = "Monthly" tax.year = 2023

Print the Tax object

Python REPL:

python print(tax)

Output:

shell URL: str = https://api-tabellkort.app.skatteetaten.no/?valgtTabell=7107&valgtInntektType=Lonn&valgtPeriode=PERIODE_1_MAANED&valgtLonn=65625&visHeleTabellen=True&valgtAar=2023&hentHeleTabellen=True Tax table: valid_tables = 7107 Income type: income_type = Wage Period: period = Monthly Year: int = 2023 Gross income: int = 65625 Tax deduction: int = 21078 Net income: int = 44547 Return whole table: {'5600': 0, '5700': 1, '5800': 30}...

Get specific values from the Tax object

Get the URL

Python REPL:

python print(f"URL: {tax.url}")

Output:

shell URL: https://api-tabellkort.app.skatteetaten.no/?valgtTabell=7107&valgtInntektType=Lonn&valgtPeriode=PERIODE_1_MAANED&valgtLonn=65625&visHeleTabellen=True&valgtAar=2023&hentHeleTabellen=True

Get the tax table

It is possible to get specific values from the Tax object. They are all available as attributes. Except for the whole table, which is available as a method.

Python REPL:

python print(f"Tax table: {tax.tax_table}")

Output:

shell Tax table: 7107

Get the income type

Python REPL:

python print(f"Income type: {tax.income_type}")

Output:

shell Income type: Wage

Get the period

Python REPL:

python print(f"Period: {tax.period}")

Output:

shell Period: Monthly

Get the year

Python REPL:

python print(f"Year: {tax.year}")

Output:

shell Year: 2023

Get the gross income

Python REPL:

python print(f"Gross income: {tax.gross_income}")

Output:

shell Gross income: 65625

Get the tax deduction

Python REPL:

python print(f"Tax deduction: {tax.deduction}")

Output:

shell Tax deduction: 21078

Get the net income

Python REPL:

python print(f"Net income: {tax.net_income}")

Output:

shell Net income: 44547

Get the whole table

Python REPL:

python print(f"Return whole table: {json.dumps(tax.get_whole_table(), indent=4)}")

Output:

shell Return whole table: { "5600": 0, "5700": 1, "5800": 30, "5900": 59, "6000": 88, "6100": 116, "6200": 145, "6300": 174, "6400": 203, "6500": ...

Raycast Script Commands

This package is also available as a Raycast script command. Just add the raycast_scripts folder to your Raycast script commands folder and you are good to go.

Owner

  • Name: Lewi Uberg
  • Login: lewiuberg
  • Kind: user
  • Location: Arendal, Norway
  • Company: @PuzzelSolutions

Full-stack Developer at Puzzel AS

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "NorTax"
abstract: "A Python client for the tax table portion of the Norwegian tax authority's API."
authors:
  - family-names: "Lie Uberg"
    given-names: Lewi
    orcid: "https://orcid.org/0000-0001-8839-0960"
version: 0.1.0
date-released: 2023-07-10
repository-code: "https://github.com/lewiuberg/nortax"
license: MIT
keywords:
  - "tax"
  - "norway"
  - "api"
  - "client"
  - "tax table"
  - "tax authority"
  - "nortax"

GitHub Events

Total
Last Year

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 9 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: nortax

A Python client for the tax table portion of the Norwegian tax authority's API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 9 Last month
Rankings
Dependent packages count: 7.4%
Forks count: 30.3%
Average: 30.4%
Stargazers count: 39.2%
Dependent repos count: 44.8%
Maintainers (1)
Last synced: 10 months ago