Python SDK for Cetustek Taiwan e-invoice API
Project description
Cetustek
Python SDK for Cetustek Taiwan e-invoice API.
Installation
pip install cetustek
Usage
from cetustek import Cetustek, CreateInvoiceInput, InvoiceItem
# Initialize the client
client = Cetustek(
endpoint="https://invoice.cetustek.com.tw/InvoiceMultiWeb/InvoiceAPI",
rent_id="YOUR_RENT_ID",
site_code="YOUR_SITE_CODE",
api_password="YOUR_API_PASSWORD",
)
# Create an invoice
invoice_input = CreateInvoiceInput(
order_id="12345678",
order_date="2026/01/15",
buyer_identifier="12345678",
buyer_name="Company Name",
buyer_email="email@example.com",
donate_mark="0",
invoice_type="07",
tax_type="1",
tax_rate=0.05,
pay_way="1",
items=[
InvoiceItem(
production_code="PROD001",
description="Product description",
quantity=1,
unit_price=1000,
unit="件",
)
],
)
result = client.createInvoice(invoice_input)
Query an Invoice
from cetustek import QueryInvoiceInput
query_input = QueryInvoiceInput(
invoice_number="AA12345678",
invoice_year="2026",
)
result = client.queryInvoice(query_input)
Cancel an Invoice
from cetustek import CancelInvoiceInput
cancel_input = CancelInvoiceInput(
invoice_number="AA12345678",
invoice_year="2026",
remark="Cancellation reason",
)
result = client.cancelInvoice(cancel_input)
# Or use no_check=True to skip validation
result = client.cancelInvoice(cancel_input, no_check=True)
License
MIT
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
cetustek-0.1.0.tar.gz
(7.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cetustek-0.1.0.tar.gz.
File metadata
- Download URL: cetustek-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f5d9a4cda7208f72d5b2f86881e8140e5ff746ab525ae6af2996a8a0af57811
|
|
| MD5 |
8322a16d675e48702817a3bf0dcd43dc
|
|
| BLAKE2b-256 |
37546517cde39846f59c3b49b947ce8f1806b77269a5573b1b8a553402d9d0ae
|
File details
Details for the file cetustek-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cetustek-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
425d2e64648a08250b2e77cddc0120c9ee93c3f17a46f02ed5ecf43d838d74b5
|
|
| MD5 |
29b389159b2a829bd89ca3bcf20d0f60
|
|
| BLAKE2b-256 |
283caefa11e951225c2e82dceafd598d7e0cf56deebbc3f6a3ad3d0392dd3c83
|