Skip to main content

Downloads PDFs and XMLs of invoices (received and emited) for later processing from Guatemalan SAT (Superintendencia de Administración Tributaria)

Project description

FEL Invoices Downloader for SAT of Guatemala

Downloads received and emited invoices in FEL (Factura En Linea) of Guatemala SAT

How to use it

Installation

pip install sat_gt_fel_invoices_downloader

Example

How to download invoice in PDF

from sat_gt_fel_invoices_downloader import SATDownloader
import datetime
import os.path
from sat_gt_fel_invoices_downloader.models import SatCredentials


sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD")
sat = SATDownloader()
sat.setCredentials(credentials=sat_credentials)
invoices = sat.get_invoices(
    datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True
)
dir = os.path.dirname(
    'c:\\Users\\my-user\\Downloads\\"'
)
for invoice in invoices:
    sat.get_pdf(invoice, save_in_dir=dir)

How to download invoice in XML

from sat_gt_fel_invoices_downloader import SATDownloader
import datetime
import os.path
from sat_gt_fel_invoices_downloader.models import SatCredentials


sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD")
sat = SATDownloader()
sat.setCredentials(credentials=sat_credentials)
invoices = sat.get_invoices(
    datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True
)
dir = os.path.dirname(
    'c:\\Users\\my-user\\Downloads\\"'
)
for invoice in invoices:
    sat.get_xml(invoice, save_in_dir=dir)

How to get invoices in model structure

from sat_gt_fel_invoices_downloader import SATDownloader
import datetime
import os.path
from sat_gt_fel_invoices_downloader.models import SatCredentials


sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD")
sat = SATDownloader()
sat.setCredentials(credentials=sat_credentials)
invoices = sat.get_invoices(
    datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True
)
dir = os.path.dirname(
    'c:\\Users\\my-user\\Downloads\\"'
)
for invoice in invoices:
    print(sat.get_model(invoice))

Project details


Download files

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

Source Distribution

sat_gt_fel_invoices_downloader-0.5.9.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file sat_gt_fel_invoices_downloader-0.5.9.tar.gz.

File metadata

File hashes

Hashes for sat_gt_fel_invoices_downloader-0.5.9.tar.gz
Algorithm Hash digest
SHA256 32ef8e8f3fa0260798306a989949208ebf6dfa878ee5be33312f050ce8863aba
MD5 ca8f4dd908f32f447c20ba0f84bd137c
BLAKE2b-256 7b339a3bb6c12e698ce47d6cf430ca270475981888a33b1aa1d4d04b055df22e

See more details on using hashes here.

File details

Details for the file sat_gt_fel_invoices_downloader-0.5.9-py3-none-any.whl.

File metadata

File hashes

Hashes for sat_gt_fel_invoices_downloader-0.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 cc7aab6d16f285d60ea6511c1727582dcb42a4075160b420348a7e681d7e1a99
MD5 08382f6583a79904fe4702df80088063
BLAKE2b-256 c5f934844674c4b82f116be759896ac3bf7e2a158acb5ca307feabf6f3c78850

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page