Metadata-Version: 2.1
Name: litex.novitus-xml
Version: 1.0.0
Summary: A Novitus XML Protocol Fiscal Printer Library
Home-page: UNKNOWN
Author: Michał Węgrzynek
Author-email: mwegrzynek@litexservice.pl
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries
Description-Content-Type: text/markdown
Requires-Dist: pyserial
Requires-Dist: lxml

# litex.novitus_xml
## Driver for a Polish fiscal printer with Novitus XML protocol

**Fiscal printer** is a [fiscal memory device](https://en.wikipedia.org/wiki/Fiscal_memory_device) used to record retail sales in Poland and few other countries in the world (eg. Russia, Czechia).

This library implements parts of [XML protocol](https://www.novitus.pl/sites/default/files/dla-programistow/drukarki-fiskalne/communication_protocol_xml_eng._17.07.2019.pdf) of one of the major Polish manufacturers [Novitus](https://www.novitus.pl/).

Printing receipt example (for more, see tests):

```python
from litex.novitus_xml import Printer

# uses USB device autodetection and no checksumming by default
# for more url examples, see PySerial documentation
# https://pyserial.readthedocs.io/en/latest/url_handlers.html
printer = Printer(
    url='hwgrep://.*Novitus.*'
) 

printer.receipt_begin()

printer.item(
    name='First product',
    quantity=2,
    quantityunit='pcs',
    ptu='A',
    price=4
)

printer.item(
    name='Second product',
    quantity=4,
    quantityunit='pcs',
    description='A long description',
    ptu='A',
    price=2        
)

printer.receipt_close(
    total=16.0,
    systemno='1/TEST/2020',
    checkout='10',
    cashier='John Doe'
)
```

