{"id":37083896,"url":"https://github.com/zfutura/pycheval","last_synced_at":"2026-01-14T10:14:47.519Z","repository":{"id":254450835,"uuid":"845002793","full_name":"zfutura/pycheval","owner":"zfutura","description":"Factur-X/ZUGFeRD parsing and generation library for Python","archived":false,"fork":false,"pushed_at":"2025-12-01T14:53:32.000Z","size":296,"stargazers_count":19,"open_issues_count":3,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-04T03:46:29.939Z","etag":null,"topics":["factur-x","invoice","invoicing","zugferd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zfutura.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-20T11:49:28.000Z","updated_at":"2025-12-02T12:53:02.000Z","dependencies_parsed_at":"2024-11-01T09:21:39.994Z","dependency_job_id":"a1bdf533-a519-4afb-97e4-e98fb3f04460","html_url":"https://github.com/zfutura/pycheval","commit_stats":null,"previous_names":["zfutura/pyfacturx","zfutura/pycheval"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/zfutura/pycheval","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfutura%2Fpycheval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfutura%2Fpycheval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfutura%2Fpycheval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfutura%2Fpycheval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zfutura","download_url":"https://codeload.github.com/zfutura/pycheval/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfutura%2Fpycheval/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["factur-x","invoice","invoicing","zugferd"],"created_at":"2026-01-14T10:14:46.951Z","updated_at":"2026-01-14T10:14:47.509Z","avatar_url":"https://github.com/zfutura.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyCheval – Factur-X/ZUGFeRD parsing and generation library for Python\n\n[![GitHub](https://img.shields.io/github/release/zfutura/pycheval/all.svg)](https://github.com/zfutura/pycheval/releases/)\n![Supported Python Versions](https://img.shields.io/pypi/pyversions/pycheval)\n[![Apache 2.0 License](https://img.shields.io/github/license/zfutura/pycheval)](https://github.com/zfutura/pycheval/blob/main/LICENSE)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/zfutura/pycheval/test-and-lint.yml)](https://github.com/zfutura/pycheval/actions/workflows/test-and-lint)\n\nFactur-X (also called ZUGFeRD in Germany) is a Franco-German standard for\nelectronic invoices. Structured XML data is embedded in PDF-A/3 files,\nallowing invoices to be processed automatically while still being displayed in\nstandard PDF readers. Factur-X supports EN 16931, the European standard for\nelectronic invoicing.\n\nSee the [Factur-X website (French)](https://www.factur-x.org/) or\n[FeRD website (German)](https://www.ferd-net.de/) for more information.\n\nThis library supports reading and writing PDF and XML files according to\nFactur-X Version 1.08 (aka ZUGFeRD 2.4). The following Factur-X profiles\nare currently supported:\n\n- Minimum\n- Basic WL\n- Basic\n- EN 16931 (Comfort)\n\nExtended and XRechnung profiles are not yet supported.\n\n**Warning**: This library is still in early development. The API may change\nfrequently, and not all features are implemented yet.\n\n## Usage\n\n### Installation\n\nYou can install PyCheval from PyPI:\n\n```bash\npip install PyCheval\n```\n\n### Generating Factur-X\n\nPyCheval supports several Factur-X profile levels, each with different levels of detail and complexity. First, you need to create an instance of the appropriate profile class. Then, you can pass that instance to one of the generation functions.\n\n```python\nfrom datetime import date\nfrom pycheval import EN16931Invoice, Money, generate_xml\n\ninvoice = EN16931Invoice(\n    invoice_number=\"2021-123\",\n    invoice_date=date(2021, 4, 13),\n    grand_total=Money(\"100.00\", \"EUR\"),\n    ...  # See the class documentation for all required and optional fields.\n)\nxml_string = generate_xml(invoice)\n```\n\nTo embed the generated XML into a PDF, you can use the `embed_invoice_in_pdf` function:\n\n```python\nfrom pathlib import Path\nfrom pycheval import embed_invoice_in_pdf\n\ninvoice = ...\npdf_bytes = embed_invoice_in_pdf(\"invoice.pdf\", invoice)\nPath(\"invoice_with_facturx.pdf\").write_bytes(pdf_bytes)\n```\n\n### Parsing Factur-X PDF files\n\nPyCheval can parse Factur-X PDF files and extract the embedded invoice data. The parser will return an instance of the appropriate profile class.\n\n```python\nfrom pycheval import parse_pdf\n\ninvoice = parse_pdf(\"invoice.pdf\")  # Returns MinimumInvoice or a subclass\n```\n\n### Printing invoices\n\nTo display a formatted Factur-X invoice in the terminal, use the `format_invoice_as_text()` function:\n\n```python\nfrom pycheval import format_invoice_as_text\n\ninvoice = EN16931Invoice(...)\nprint(format_invoice_as_text(invoice))\n```\n\n### License and Warranty\n\n**Copyright © ZFutura GmbH**\n\nThis project is licensed under the [Apache License 2.0](LICENSE).\n\n**Disclaimer**: The software is provided \"as is\", without warranty of any kind. \nThe authors are not liable for any damages arising from the use of this\nsoftware. In particular, the authors do not guarantee that invoices generated\nor parsed by this library will be valid or compliant with any standards, nor\nthat they are suitable for any specific purpose. \n\n**Important**: It is the user's responsibility to ensure that generated\ninvoices meet all legal and regulatory requirements for their jurisdiction.\n\nSee the [LICENSE](LICENSE) file for the complete disclaimer and license terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfutura%2Fpycheval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzfutura%2Fpycheval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfutura%2Fpycheval/lists"}