Skip to main content

No project description provided

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.13.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for sat_gt_fel_invoices_downloader-0.5.13.tar.gz
Algorithm Hash digest
SHA256 651ad6bd7320306a95ca47378c5a3cd8437649afc4b81bbcb6118097680671da
MD5 86fa981499b6f0982f590b910712e3a6
BLAKE2b-256 c8fcb97285def6c3bbfd6d518df66824bfae846858a5b3c2ebb7d606bcf75e51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sat_gt_fel_invoices_downloader-0.5.13-py3-none-any.whl
Algorithm Hash digest
SHA256 82775b58f4b72aa7b30d4d073bd867dbde6ede1ea6e0e6a92deb0648a2151c0c
MD5 f618eb107f6ba7b57003523f911a98be
BLAKE2b-256 19534b61adc94b8f83530e1f1acca37d950df98272bebe24d0ffd357aeb2cf14

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