IFirma API client
Project description
Python wrapper for ifirma's API
Requires Python 3.8
or later.
This little project aims to refresh my python coding skills.
Besides coding fun this code also supported invoicing in a few small online shops. It does its job pretty well.
First version was inspired of @DariuszAniszewski's python-ifirma but covers slightly different operations.
Features
It supports following operations
- create invoice (VAT payer)
- create invoice (non-VAT payer)
- send email with pdf-invoice attached (it sends also copy to the account owner)
- parses invoice described with yaml file
Getting started
pip install pnowosie.ifirma-api
or from this repository
pip install -e git+git@github.com:pnowosie/ifirma-api.git#egg=pnowosie.ifirma-api
Invoice creation
Please review example from ./sample_invoice
directory. You will find there how to create and send invoice via email with yaml file.
Or create invoice from code
from ifirma.invoice import (Invoice, Customer, InvoicePosition, INVOICE_TYPE)
invoice = Invoice(
invoice_type=INVOICE_TYPE.NON_VAT_PAYER,
issue_date=datetime(...)
).with_issuer(
'Imię Nazwisko'
).with_payed(
float(price)
).with_comments(
f"Nr zamówienia: {numer}"
).with_position(
InvoicePosition(product_name, float(price)
).with_new_customer(
Customer(full_name, email, zip, city, street1, street2)
)
if you registered your customer in ifirma
you can use
invoice.with_known_customer(
name, tax_id
)
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
Built Distribution
Close
Hashes for pnowosie.ifirma-api-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef59dff6921e85d719793e78dd71d6e4668e8d1fb650034b74bf25120a1e1aca |
|
MD5 | 32622d142f3218f3932ed8de51a0b001 |
|
BLAKE2b-256 | 129a4f81468b68e6656620caa7b208c96a163439879042eb6d2a2a9324651c58 |
Close
Hashes for pnowosie.ifirma_api-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d86514ae188b21b35ca935e48c3fbc163e90f453ceb81d21619add3e93734f0b |
|
MD5 | b727f7417504b279312426c0a53c5009 |
|
BLAKE2b-256 | 12d12a2a55dadffe9290d70f382f6bd4558c187c2a123c88f59938b5edfef930 |