Skip to main content

neadva

Python 3 implementation of Hungarian Tax Office (NAV) version 3 reporting api

0.52 Alpha version update of the module. Can be used to supply data and return transaction numbers safely (working). Suggest to check the invoices before submitting in the test interface of NAV API first

More work required for full interface support of NAV API.

Clone the repo to install:

git clone https://github.com/ServerAstra/neadva

or install using pip:

pip install neadva

Overall library architecture at the moment allows one-liners as well as full object-oriented approach.

Every interface class allows overrides for configuration and necessary options, they also provide result items as a dictionary and as properties simultaneously allowing automated processing and ease of use via interpreter console.

In the future we will also implement additional interface for familiar ORM like methods.

Unfortunately the limitations of NAV API and its documentation prevent this from becoming a priority so this has been postponed for the time being.

Usage:

    from neadva import Invoice, Transaction, SubmitInvoices, MapTaxNumber, Config
    Config.user = {"login": "login",
            "password": "password",
            "taxNumber": "12345678",
            "signKey": "12-345678-910111213141516",
            "exchangeKey": "12345678910"}
    Config.software = {"softwareId": "HU12345678RANDOM",
                "softwareName": "None",
                "softwareOperation": "LOCAL_SOFTWARE",
                "softwareMainVersion": "0",
                "softwareDevName": "NAV Kft.",
                "softwareDevContact": "nun@nil.com"}
    taxrequestdata = MapTaxNumber('12345678')()
    print(taxrequestdata)
    print(taxrequestdata.items())
    import glob
    invoices = SubmitInvoices()
    for invoice in glob.glob('Invoices/*.xml'):
        print(invoice)
        with open(invoice, 'r') as f:
            invoices.append(Invoice(f.read()))
    sentinvoices = invoices()
    print(sentinvoices.transaction)
    print(sentinvoices.items())

or since v0.5

    for invoice in glob.glob('Invoices/*.xml'):
        invoices.append(Invoice.fromfile(invoice))
    sentinvoices = invoices()
    print(sentinvoices.transaction)
    print(sentinvoices.items())

Optionally you can choose to not compress data:

    Config.compression = False

Or go live with:

    Config.live = True

Config class is global for all instances in the current interpreter run. However you can supply an instance explicitly via config = Config(**configvalues) where configvalues has user dict and software dict and includes other non-default modifications for each separate class.

Warning

Tested only with test interface of NAV not production interface. Might still have some bugs due to differences in test and prod environment which happens sometimes

Modules required:

pip install pycryptodome lxml pybase62 requests

Todo:

  • Support for transaction search
  • Support for invoice search
  • Single interface where you just use neadva.taxinfo('12345678') neadva.upload(*files) neadva.download(from="2021-04", till="2021-10") neadva.status(*listofinvoices)
  • Support for annulments

Release files for neadva 0.52

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

Source distribution (sdist)

Source distribution for neadva 0.52
File Size Uploaded
neadva-0.52.tar.gz 48.9 kB Details

Built distribution (wheel)

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

Total release size: 100.2 kB

Release files / neadva-0.52.tar.gz

Download URL neadva-0.52.tar.gz
Size 48.9 kB
Tags Source
SHA-256 checksum
How to use checksums
57f8ff9a64d900432eae45d3f8cff12d5f1f9d99f9161d014c12138e06b452ca
BLAKE2b-256 checksum
How to use checksums
c74bcbfab4212d5a415adaedbf387d7ab0fc4a5bedcbf9b6737e8b4cad9030d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / neadva-0.52-py3-none-any.whl

Download URL neadva-0.52-py3-none-any.whl
Size 51.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3e65acebc5449eff0a788f0109e64bed2f6f3745f19407f74e71fa98dd00919
BLAKE2b-256 checksum
How to use checksums
5171ccb46be9d2e04f398bbdc5e8797f90c35a45b23d3a2c056c68d34ea1aa53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.52 This release

2 release files

0.51

2 release files

0.4

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