Skip to main content

# Netvisor: Python API client

Project description

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'])

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

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

netvisor-api-client-0.9.4.tar.gz (43.1 kB view hashes)

Uploaded Source

Built Distribution

netvisor_api_client-0.9.4-py3-none-any.whl (43.1 kB view hashes)

Uploaded Python 3

Supported by

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