Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Python library for i.SAF VAT report generation.

Project description

Python library for i.SAF VAT report generation.

Features

  • i.SAF data validation based on XSD
  • i.SAF XML builder

Usage

A complete example of i.SAF data dict can be found in the tests.

from pyisaf import schema_v1_2 as isaf_schema, ISAF1_2Builder as Builder
from schema import SchemaError


# Prepare i.SAF data
data = {
    'header': {
        'file_description': {
            # ...
        },
    },
    'master_files': {
        'customers': {
            # ...
        },
        'suppliers': {
            # ...
        },
    },
    'source_documents': {
        'purchase_invoices': {
            # ...
        },
        'sales_invoices': {
            # ...
        },
        'settlements_and_payments': {
            # ...
        },
    },
}
# Validate data against i.SAF schema
isaf_data = isaf_schema.validate(data)

# Build the XML
builder = Builder(isaf_data)
isaf_xml = builder.dumps()

History

v0.1.8 (2017-02-01)

  • Updates links after repository transfer.

v0.1.7 (2017-01-24)

  • Fixes rendering of elements which are nillable to set xsi:nil attribute

v0.1.6 (2017-01-06)

  • Adds Python 3.6 build

v0.1.5 (2016-12-05)

  • Fixes to not add empty tags like Customers, Suppliers, PurchaseInvoices if the underlying collection is empty.

v0.1.4 (2016-11-30)

  • Fixes nillable dates rendering

v0.1.3 (2016-11-24)

  • Includes packages (fail)
  • Removes docs from the packages

v0.1.2 (2016-11-24)

  • Minor fixes in description

v0.1.1 (2016-11-24)

  • Initial version

Project details


Release history Release notifications

This version
History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pyisaf-0.1.8-py2.py3-none-any.whl (10.8 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Feb 1, 2017
pyisaf-0.1.8.tar.gz (11.2 kB) Copy SHA256 hash SHA256 Source None Feb 1, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page