Skip to main content

Toshling - a Python client library for the Toshl API

Toshling is an(other) implementation of a client for the Toshl API.

Installation

Toshling can be installed from the PyPI using pip:

pip install toshling

Usage

All interaction with Toshl is done via the Client class, which is constructed with your API key:

import toshling

client = toshling.Client('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')

Namespaces and methods under the client generally match the API documentation. All arguments passed must be in keyword=value form. Due to some keywords being reserved or invalid in Python, some substitutes must be made. Examples are below:

accounts = client.accounts.list()
groceries_category = client.categories.list(search='Groceries')[0]
everything_but_groceries = client.entries.list(account=accounts[0].id,
                                               from_='2020-12-01',
                                               to='2020-12-31', not_categories=groceries_category.id)
client.entries.create(amount=168.43,
                      currency={'code': 'AUD'},
                      date='2020-03-06',
                      desc='Toilet paper for COVID-19 end-of-days',
                      account=accounts[0].id,
                      category=groceries_category.id)

More details on the required argument types and their validation can be found in the toshling.models.argument_types and toshling.models.return_types.

Issues

Toshling has numerous flaws, mostly due to the incomplete JSON Hyper-Schema documents provided by Toshl, which are inconsistent, based on an old draft spec and do not match their actual API documentation.

Ideally the full client would be automatically generated from the schemas, but that is not currently possible. Instead, as much functionality as possible was implemented in a semi-automated manner, with the expectation that edge cases will present themself in day-to-day usage.

Please feel free to submit issues for consideration on GitHub.

  • toshl - a seemingly unmaintained API client missing some key features such as getting entries.
  • toshl-api - an autogenerated client without much documentation.

Release files for toshling 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toshling 0.0.4
File Size Uploaded
toshling-0.0.4.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for toshling 0.0.4
File Interpreter ABI Platform
toshling-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 27.5 kB

Release files / toshling-0.0.4.tar.gz

Download URL toshling-0.0.4.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1f42ba236a048416a6b2b79713357aae0b3f6196d74ba424a13a5e0363db5d17
BLAKE2b-256 checksum
How to use checksums
3a57eb3a736e7b0826f3009669091e027a17f0467ab16bd455f57dcb9aa251ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.6

Release files / toshling-0.0.4-py3-none-any.whl

Download URL toshling-0.0.4-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54f7f7da3e8d89054da192e54ba01531c415d131fee01a7e0354d0f9d65e8b1b
BLAKE2b-256 checksum
How to use checksums
b164db8a801467b64b266cb807126b01762e7bfb840df4df3c8c0ab72f110aa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page