neadva


Nameneadva JSON
Version 0.52 PyPI version JSON
download
home_pagehttps://github.com/ServerAstra/neadva
SummaryHungarian Tax Authority NAV reporting api library
upload_time2023-01-28 00:24:51
maintainer
docs_urlNone
authorAndrew Azarov
requires_python
licenseMIT
keywords tax hungary reporting api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:
-----------
```python
    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

```python
    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:
```python
    Config.compression = False
```
Or go live with:
```python
    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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ServerAstra/neadva",
    "name": "neadva",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "tax,hungary,reporting,api",
    "author": "Andrew Azarov",
    "author_email": "andrew@serverastra.com",
    "download_url": "https://files.pythonhosted.org/packages/c7/4b/cbfab4212d5a415adaedbf387d7ab0fc4a5bedcbf9b6737e8b4cad9030d1/neadva-0.52.tar.gz",
    "platform": null,
    "description": "# neadva\r\nPython 3 implementation of Hungarian Tax Office (NAV) version 3 reporting api\r\n-----------\r\n0.52 Alpha version update of the module. Can be used to supply data and return transaction numbers safely (working).\r\nSuggest to check the invoices before submitting in the test interface of NAV API first\r\n\r\nMore work required for full interface support of NAV API.\r\n\r\nClone the repo to install:\r\n\r\n`git clone https://github.com/ServerAstra/neadva`\r\n\r\nor install using pip:\r\n\r\n`pip install neadva`\r\n\r\nOverall library architecture at the moment allows one-liners as well as full object-oriented approach.\r\n\r\nEvery 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.\r\n\r\nIn the future we will also implement additional interface for familiar ORM like methods.\r\n\r\nUnfortunately the limitations of NAV API and its documentation prevent this from becoming a priority so this has been postponed for the time being.\r\n\r\nUsage:\r\n-----------\r\n```python\r\n    from neadva import Invoice, Transaction, SubmitInvoices, MapTaxNumber, Config\r\n    Config.user = {\"login\": \"login\",\r\n            \"password\": \"password\",\r\n            \"taxNumber\": \"12345678\",\r\n            \"signKey\": \"12-345678-910111213141516\",\r\n            \"exchangeKey\": \"12345678910\"}\r\n    Config.software = {\"softwareId\": \"HU12345678RANDOM\",\r\n                \"softwareName\": \"None\",\r\n                \"softwareOperation\": \"LOCAL_SOFTWARE\",\r\n                \"softwareMainVersion\": \"0\",\r\n                \"softwareDevName\": \"NAV Kft.\",\r\n                \"softwareDevContact\": \"nun@nil.com\"}\r\n    taxrequestdata = MapTaxNumber('12345678')()\r\n    print(taxrequestdata)\r\n    print(taxrequestdata.items())\r\n    import glob\r\n    invoices = SubmitInvoices()\r\n    for invoice in glob.glob('Invoices/*.xml'):\r\n        print(invoice)\r\n        with open(invoice, 'r') as f:\r\n            invoices.append(Invoice(f.read()))\r\n    sentinvoices = invoices()\r\n    print(sentinvoices.transaction)\r\n    print(sentinvoices.items())\r\n```\r\n\r\nor since v0.5\r\n\r\n```python\r\n    for invoice in glob.glob('Invoices/*.xml'):\r\n        invoices.append(Invoice.fromfile(invoice))\r\n    sentinvoices = invoices()\r\n    print(sentinvoices.transaction)\r\n    print(sentinvoices.items())\r\n```\r\nOptionally you can choose to not compress data:\r\n```python\r\n    Config.compression = False\r\n```\r\nOr go live with:\r\n```python\r\n    Config.live = True\r\n```\r\n\r\nConfig class is global for all instances in the current interpreter run.\r\nHowever 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.\r\n\r\nWarning\r\n-----------\r\nTested 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\r\n\r\nModules required:\r\n-----------\r\n`pip install pycryptodome lxml pybase62 requests`\r\n\r\nTodo:\r\n\r\n* Support for transaction search\r\n* Support for invoice search\r\n* Single interface where you just use `neadva.taxinfo('12345678')` `neadva.upload(*files)` `neadva.download(from=\"2021-04\", till=\"2021-10\")` `neadva.status(*listofinvoices)`\r\n* Support for annulments\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Hungarian Tax Authority NAV reporting api library",
    "version": "0.52",
    "split_keywords": [
        "tax",
        "hungary",
        "reporting",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5171ccb46be9d2e04f398bbdc5e8797f90c35a45b23d3a2c056c68d34ea1aa53",
                "md5": "ea048a9d23f15a5722b0609420d17a4c",
                "sha256": "e3e65acebc5449eff0a788f0109e64bed2f6f3745f19407f74e71fa98dd00919"
            },
            "downloads": -1,
            "filename": "neadva-0.52-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ea048a9d23f15a5722b0609420d17a4c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 51272,
            "upload_time": "2023-01-28T00:24:49",
            "upload_time_iso_8601": "2023-01-28T00:24:49.673740Z",
            "url": "https://files.pythonhosted.org/packages/51/71/ccb46be9d2e04f398bbdc5e8797f90c35a45b23d3a2c056c68d34ea1aa53/neadva-0.52-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c74bcbfab4212d5a415adaedbf387d7ab0fc4a5bedcbf9b6737e8b4cad9030d1",
                "md5": "722c69cff7efb5f3157e44e693e4c03c",
                "sha256": "57f8ff9a64d900432eae45d3f8cff12d5f1f9d99f9161d014c12138e06b452ca"
            },
            "downloads": -1,
            "filename": "neadva-0.52.tar.gz",
            "has_sig": false,
            "md5_digest": "722c69cff7efb5f3157e44e693e4c03c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 48921,
            "upload_time": "2023-01-28T00:24:51",
            "upload_time_iso_8601": "2023-01-28T00:24:51.679648Z",
            "url": "https://files.pythonhosted.org/packages/c7/4b/cbfab4212d5a415adaedbf387d7ab0fc4a5bedcbf9b6737e8b4cad9030d1/neadva-0.52.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-28 00:24:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ServerAstra",
    "github_project": "neadva",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "neadva"
}
        
Elapsed time: 0.06184s