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
from decimal import Decimal
tbai = TBai(json)
invoice = tbai.create_invoice("TB-2021-S", 1, "First invoice", "S")
invoice.create_line("First product", Decimal("1"), Decimal("200"), Decimal("20"))
invoice.create_line("Second product", Decimal("2"), Decimal("350"))
The json parameter is a previous JSON file you've created.
Finally sign and send the invoice:
result = tbai.sign_and_send("/path_to_p12_certificate", "password")
You can also get the full structure of TBai invoice:
json_structure = tbai.get_json(invoice)
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.
Metadata
Release files for pytbai 1.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytbai-1.8.0.tar.gz | 31.6 kB | Without provenance | Details for pytbai-1.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytbai-1.8.0-py3-none-any.whl | Python 3 | none | any | Details for pytbai-1.8.0-py3-none-any.whl |
Total release size: 54.5 kB
Release files / pytbai-1.8.0.tar.gz
| Download URL | pytbai-1.8.0.tar.gz |
|---|---|
| Size | 31.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
277e4fe112d91a3e1b7df522e9aca54d0d0f6f0e7f9007bc9d66ac30ef5e4af5
|
|
BLAKE2b-256 checksum How to use checksums |
52442159f95a97d02394636e14cd8930234c716da51a5459a7bb5cbac5de4a6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / pytbai-1.8.0-py3-none-any.whl
| Download URL | pytbai-1.8.0-py3-none-any.whl |
|---|---|
| Size | 22.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b0e07a23767f1f4549cc4d20802094f784d86aab0022423284af7544ac6ee48
|
|
BLAKE2b-256 checksum How to use checksums |
d651af9e653d12bf1bdc712f80857892732b6ee5d2d24b5c9951431d26c0ad89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for pytbai 1.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.