How to use the invoice2data.extract.invoice_template.InvoiceTemplate function in invoice2data

To help you get started, we’ve selected a few invoice2data examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github invoice-x / invoice2data / invoice2data / extract / invoice_template.py View on Github external
def __init__(self, *args, **kwargs):
        super(InvoiceTemplate, self).__init__(*args, **kwargs)

        # Merge template-specific options with defaults
        self.options = OPTIONS_DEFAULT.copy()

        for lang in self.options['languages']:
            assert len(lang) == 2, 'lang code must have 2 letters'

        if 'options' in self:
            self.options.update(self['options'])

        # Set issuer, if it doesn't exist.
        if 'issuer' not in self.keys():
            self['issuer'] = self['keywords'][0]

invoice2data

Python parser to extract data from pdf invoice

MIT
Latest version published 12 months ago

Package Health Score

68 / 100
Full package analysis

Similar packages