Skip to main content

pytbai allows to create, manage and send TicketBai invoices to the Basque tax authorities

Project description

pytbai

pytbai allows to create, manage and send TicketBai invoices to the Basque tax authorities.

Usage

You need to configure your bussiness and software info in a JSON file:

{
  "subject": {
    "entity_id": "99999974E",
    "name": "BUSSINESS NAME"
  },
  "software": {
    "license": "TBAIGIPRE00000000501",
    "dev_entity": "P2000000F",
    "soft_name": "TBAI",
    "soft_version": "1.0"
  }
}

Then create a invoice:

from pytbai import TBai

tbai = TBai(json)
invoice = tbai.create_invoice("TB-2021-S", 1, "First invoice", "S")

invoice.create_line("First product", 1, 200, 20)
invoice.create_line("Second product", 2, 350)

The json parameter is a previous JSON file you've created.

Finally sign and send the invoice:

tbai_kode = tbai.sign_and_send(cert_file.p12, "password")

TODO

  • Recipient data
  • Multiple recipient data
  • Third party / Recipient's invoices
  • Corrective invoices
  • Corrected or replaced invoices
  • Tax free invoices
  • Invoices without national counterparty
  • Chaining of previous invoice

How to contribute

Please read the Code of Conduct documentation first, then all contributions are done via Pull Requests on GitHub but don´t hesitate to open a new issue.

Credits

This project is made by CodeSyntax.

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

pytbai-1.1.tar.gz (19.1 kB view details)

Uploaded Source

File details

Details for the file pytbai-1.1.tar.gz.

File metadata

  • Download URL: pytbai-1.1.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.6

File hashes

Hashes for pytbai-1.1.tar.gz
Algorithm Hash digest
SHA256 80face3f2ac5f388ca2227d365d19550ce7309b39a931a0c6dceb47e1894c1ec
MD5 508e75ea695fec16c02330e1b546e8b2
BLAKE2b-256 74284b1709088e2179ba30ddf13e15a8145d9625b0ee13b3d4a79f2c8b09aac1

See more details on using hashes here.

Provenance

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