Skip to main content

Netvisor: Python API client

PyPI version License Downloads Code style: black Imports: isort


Python client for the Netvisor API.


Installation

You can install netvisor with pip::

$ pip install netvisor-api-client

Usage example

from netvisor_api_client import Netvisor
from datetime import date, timedelta

# Create a client
client = Netvisor(
    host="https://isvapi.netvisor.fi",
    sender="Test client",
    partner_id="x",
    partner_key="x",
    customer_id="x",
    customer_key="x",
    organization_id="1967543-8",
    language="EN"
)

# Get a list of sales invoices for last 14 days
invoices = client.sales_invoices.list(start_date=date.today() - timedelta(days=14), end_date=date.today())

# Get detailed information for the first invoice
invoice_details = client.sales_invoices.get(invoices[0]['netvisor_key'])

Running tests

Run tests locally using pytest or by running docker docker run --rm -it $(docker build -f tests.dockerfile -q .)

Known issues

Language

Using language other than EN can cause failures when parsing responses containing localised boolean like values.

Example: "Yes" and "No" parsed to bool True and False fails when language is FI

from netvisor_api_client.schemas.fields import Boolean

# Current schema
match_partial_payments_by_default = Boolean(true="Yes", false="No")

# i.e. for FI this should be
match_partial_payments_by_default = Boolean(true="Kyllä", false="Ei")

Resources

Metadata

Release files for netvisor-api-client 0.9.6

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

Source distribution (sdist)

Source distribution for netvisor-api-client 0.9.6
File Size Uploaded
netvisor_api_client-0.9.6.tar.gz 49.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netvisor-api-client 0.9.6
File Interpreter ABI Platform
netvisor_api_client-0.9.6-py3-none-any.whl Python 3 none any Details

Total release size: 111.7 kB

Release files / netvisor_api_client-0.9.6.tar.gz

Download URL netvisor_api_client-0.9.6.tar.gz
Size 49.2 kB
Tags Source
SHA-256 checksum
How to use checksums
933f3aa6ef701c6c5ff8c1bccbd3fa3288255d455af5ea6a72f9aaab70582b9f
BLAKE2b-256 checksum
How to use checksums
640b9ad95b14473977dfd1365f9bf864b3f80f4921129ff05f913b969ae8fa96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / netvisor_api_client-0.9.6-py3-none-any.whl

Download URL netvisor_api_client-0.9.6-py3-none-any.whl
Size 62.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67020b44aa585e29631791e05389b049a35707d180a43e655de87cd56bf3ec72
BLAKE2b-256 checksum
How to use checksums
56ed9a60d342dd9288ae3200ec184cd1ad515e83306a5925276c7fec5b5bccbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.9.6 This release

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

1 release file

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

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