Skip to main content

Python toolkit for interacting with the OSI Finance API

Project description

osifinanceAPI: Python API for OSI Finance REST API

osifinanceAPI is a Python package for accessing OSI Finance's financial calculators. The library enables developers to programmatically calculate taxes, social security, and other tax-related values.

Installation

You can install osifinanceAPI with pip:

pip install osifinanceAPI

Documentation

Full documentation is available here.

Quickstart

Getting started with osifinanceAPI is easy.

Like most API clients, osifinanceAPI exposes a single class that provides access to the rest of the API: Osifinance.

The first thing to do is instantiate a new Osifinance object by providing your Osifinance instance’s root API URL and a valid API key. Additionally, you can include constant financial data such as your filing status or salary.

# Import the Osifinance class
from osifinanceAPI import Osifinance

# OSI Finance API key
API_KEY = "p@$$w0rd"

# Initialize a new Osifinance object
osi = Osifinance(API_KEY)

# You can now use osi to begin making API calls.

# Working with Osifinance Objects
# osifinanceAPI converts the JSON responses from the host website into Pandas dataframes

# Get income taxes
df_income_taxes = osi.income_taxes(filing_status='single', agi=100000)

# Access the total taxes
df_income_taxes.taxes.total

# State tax information can be found using the StateTaxes Class
from osifinanceAPI import StateTaxes

# Initialize a new StateTaxes object
state_taxes = StateTaxes(API_KEY)

alabama_taxes = state_taxes.alabama(agi=100000)

# Alternatively, you can access a sources dict by passing in sources=True
alabama_taxes = state_taxes.alabama(agi=100000, sources=True)
alabama_taxes['sources']

# To access the dataframe in this case, you must access the data key first
alabama_taxes['data'] 

Contact Us

Need help? Have an idea? Feel free to check out our Discussions board. Just want to say hi or get extended spport? Come join the OSI Finance Discord Channel!

Disclaimer

I undestand that OSI Finance reads my financial information when performing calculations and does not store any of my information. For more information, please visit our Legal Disclaimer.

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

osifinanceAPI-0.1.1.tar.gz (447.7 kB view details)

Uploaded Source

Built Distribution

osifinanceAPI-0.1.1-py3-none-any.whl (463.8 kB view details)

Uploaded Python 3

File details

Details for the file osifinanceAPI-0.1.1.tar.gz.

File metadata

  • Download URL: osifinanceAPI-0.1.1.tar.gz
  • Upload date:
  • Size: 447.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for osifinanceAPI-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cf21da6f9e83f28b8c89a9a7647c9db4a06e0abe089553fc8b6143c70d285c6a
MD5 de25f33d89656cb13d45d5b95022c2ee
BLAKE2b-256 dba84280022afebb15f36b7469346f239dbb9458ed3ab91e4b6382d9e5842011

See more details on using hashes here.

File details

Details for the file osifinanceAPI-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: osifinanceAPI-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 463.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for osifinanceAPI-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07666b46ceb9694609ae3ff8863bedc4c851390121d3293e92b51e70f213eada
MD5 6e88cae8d4be8dfaa2e90b2acca6ce4b
BLAKE2b-256 8aa27b229df12e8f9541708176b6cfd75c67dbabf2fc9e7e54e411afd59b2843

See more details on using hashes here.

Supported by

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