Initial version of the E-Invoice solution of JR IT Services
This commit is contained in:
8
jr_einvoice/io.py
Normal file
8
jr_einvoice/io.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from __future__ import annotations
|
||||
from pathlib import Path
|
||||
import yaml
|
||||
from .models import Invoice
|
||||
|
||||
def load_invoice_yaml(path: Path) -> Invoice:
|
||||
data = yaml.safe_load(path.read_text(encoding="utf-8"))
|
||||
return Invoice.model_validate(data)
|
||||
Reference in New Issue
Block a user