{ "info": { "author": "Raphael Michel", "author_email": "michel@rami.io", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Other Audience", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "drafthorse -- Basic ZUGFeRD implementation in Python\n====================================================\n\n.. image:: https://travis-ci.com/pretix/python-drafthorse.svg?branch=master\n :target: https://travis-ci.com/pretix/python-drafthorse\n\n.. image:: https://codecov.io/gh/pretix/python-drafthorse/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/pretix/drafthorse\n\n.. image:: http://img.shields.io/pypi/v/drafthorse.svg\n :target: https://pypi.python.org/pypi/drafthorse\n\nThis is a low-level python implementation of the ZUGFeRD XML format. ZUGFeRD is a German\nformat for sending digital invoices. ZUGFeRD XML files are to be attached to a PDF\nfile. This library can be used to generate or parse the contents of this XML file as well as\nattach it to a PDF. We do not support parsing PDF files (for now).\n\nBy low-level, we mean that this library models the ZUGFeRD data model 1:1 without any further\nabstractions or simplifications. You can set and parse all parameters defined in ZUGFeRD 1.0.\n\nAll output is validated against the official XSDs, but no validation of profile levels (basic, comfort, extended) is performed.\n\nUsage\n-----\n\nParsing::\n\n >>> from drafthorse.models.document import Document\n >>> samplexml = open(\"sample.xml\", \"rb\").read()\n >>> doc = Document.parse(samplexml)\n >>> str(doc.trade.agreement.seller.name)\n 'Lieferant GmbH'\n\nGenerating::\n\n >>> from datetime import date\n >>> from drafthorse.models.document import Document\n >>> from drafthorse.models.note import IncludedNote\n\n >>> doc = Document()\n >>> doc.context.guideline_parameter.id = \"urn:ferd:CrossIndustryDocument:invoice:1p0:comfort\"\n >>> doc.header.id = \"RE1337\"\n >>> doc.header.name = \"RECHNUNG\"\n >>> doc.header.type_code = \"380\"\n >>> doc.header.issue_date_time.value = date.today()\n >>> doc.header.languages.add(\"de\")\n >>> note = IncludedNote()\n >>> note.content.add(\"Test Node 1\")\n >>> doc.header.notes.add(n)\n >>> doc.trade.agreement.seller.name = \"Lieferant GmbH\"\n\n >>> xml = doc.serialize()\n >>> xml\n b'>> new_pdf_bytes = attach_xml(original_pdf_bytes, xml, 'BASIC')\n\n\nDevelopment\n-----------\n\nTo run the included tests::\n\n pip install -r requirements_dev.txt\n py.test tests\n\nTo automatically sort your Imports as required by CI::\n\n pip install isort\n isort -rc .\n\n\nCredits and License\n-------------------\n\nMaintainer: Raphael Michel \n\nLicense of the Python code: Apache License 2.0\n\nThe PDF handling (drafthorse/pdf.py) is based on the code of factur-x, Copyright 2016-2018, Alexis de Lattre ,\nreleased under a BSD license.\n\nThe packages includes schemas and samples of the ZUGFeRD specification (.xsd and .xml files) which are owned by the *Forum f\u00fcr elektronische Rechnungen bei der AWV e.V (\u201eFeRD\u201c)* and are released under a proprietary license that allows bundling them together with other software for free.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pretix/python-drafthorse", "keywords": "xml banking sepa", "license": "Apache License", "maintainer": "", "maintainer_email": "", "name": "drafthorse", "package_url": "https://pypi.org/project/drafthorse/", "platform": "", "project_url": "https://pypi.org/project/drafthorse/", "project_urls": { "Homepage": "https://github.com/pretix/python-drafthorse" }, "release_url": "https://pypi.org/project/drafthorse/1.1.1/", "requires_dist": [ "lxml", "PyPDF2" ], "requires_python": "", "summary": "Python ZUGFeRD XML implementation", "version": "1.1.1" }, "last_serial": 5153871, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "45ffe05b58088e6b4f5ca9a988ea91e0", "sha256": "4f868b4845ee826c7dc0f4e484471e888b375a9bc573dbd176bb40b1ae894971" }, "downloads": -1, "filename": "drafthorse-0.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "45ffe05b58088e6b4f5ca9a988ea91e0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21252, "upload_time": "2018-10-16T19:07:19", "url": "https://files.pythonhosted.org/packages/cf/f6/4521dd74c820b89c67b7280f2f8f7aad4b52f27386c8e85202bce5ecc8b0/drafthorse-0.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9522561bc104206108f6c8ff8f091a51", "sha256": "ac0be80478878b773bd2f3a5fadb4c9faceb9e4238e58c4f5a80112d8b2d9dff" }, "downloads": -1, "filename": "drafthorse-0.0.0.tar.gz", "has_sig": false, "md5_digest": "9522561bc104206108f6c8ff8f091a51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 68928, "upload_time": "2018-10-16T19:07:22", "url": "https://files.pythonhosted.org/packages/0f/db/09f2b14bed4d9db19862b4c8f6d9dcfd7b9ec62447d1d1d01d3eb6397209/drafthorse-0.0.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "bbec94fbc67471fb60f0d0bb551dbf4b", "sha256": "7d92552c7d9dc32f94753f356344549e262f674e94576480a7a02b667258341c" }, "downloads": -1, "filename": "drafthorse-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bbec94fbc67471fb60f0d0bb551dbf4b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 79138, "upload_time": "2018-10-27T21:25:33", "url": "https://files.pythonhosted.org/packages/1f/67/ccc5ec08c5dec22743a16f3e68f3814274d76d25c3e09b834cb8db3aa9fb/drafthorse-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f70d21698228d36ef64d71db5ea50aca", "sha256": "83828afd05c8c4394943bf2e85c8f06c9daf86a600dc18409a9b480e7a3815e1" }, "downloads": -1, "filename": "drafthorse-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f70d21698228d36ef64d71db5ea50aca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 72632, "upload_time": "2018-10-27T21:25:35", "url": "https://files.pythonhosted.org/packages/55/ea/579e6271781c75d2608f037573f9faa43c9f70dd69ceef31689889abc35d/drafthorse-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "bb877ce80a2db83e88c2206531b71fa0", "sha256": "22253f68b9232b18a4ec525abb8a2a45a6e04cf9ec0d0cc3cba75fa3899df213" }, "downloads": -1, "filename": "drafthorse-1.0.1-py3.6.egg", "has_sig": false, "md5_digest": "bb877ce80a2db83e88c2206531b71fa0", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 108491, "upload_time": "2018-11-06T17:43:50", "url": "https://files.pythonhosted.org/packages/b8/58/7adcc698997398d0760ede8be2340acc9f3516eb673619892ae363a85a37/drafthorse-1.0.1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "e89101d11def4aab9763dbc17fd79238", "sha256": "a2262c85d1095bbba167cb61130a75bdc048a28d738fbf3d87aa431959afc66c" }, "downloads": -1, "filename": "drafthorse-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e89101d11def4aab9763dbc17fd79238", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 79431, "upload_time": "2018-10-30T13:38:10", "url": "https://files.pythonhosted.org/packages/52/fb/7621f272f33378472339446c0a4f60ed5619c400d0e0777459edc8efb7a7/drafthorse-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5e8fda0655112bfd82d72a8c08a6dc81", "sha256": "69e9d543c23ca5945774ea2060a7da2507c29ff12952c13f39e26b92d62399bc" }, "downloads": -1, "filename": "drafthorse-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5e8fda0655112bfd82d72a8c08a6dc81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 72242, "upload_time": "2018-10-30T13:38:12", "url": "https://files.pythonhosted.org/packages/d7/01/37f1c2c660118aa4243b3f59bb905146f95f7af518bbcac8e81051c38cf1/drafthorse-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "18a5d7de6aa44cd5980539618b2896e8", "sha256": "b6f9d27197ff046fbf139cb2cf0c259861240a98346d8710014b08a19d4853ed" }, "downloads": -1, "filename": "drafthorse-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "18a5d7de6aa44cd5980539618b2896e8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 76915, "upload_time": "2018-11-06T17:43:48", "url": "https://files.pythonhosted.org/packages/9b/95/9fc857a0285025eaec46c5746782d3d505bf62af64408d3d0ad02b9513ed/drafthorse-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7807f660fda4d47b367de2f7da5048eb", "sha256": "87aa9b4cd49b96bc085cffc9b4d2e0ee3a89ef11146a37a54528933faf63fa1f" }, "downloads": -1, "filename": "drafthorse-1.1.0.tar.gz", "has_sig": false, "md5_digest": "7807f660fda4d47b367de2f7da5048eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 73606, "upload_time": "2018-11-06T17:43:52", "url": "https://files.pythonhosted.org/packages/47/c1/3bad6c463c8f1bb57e72bed580cefa20b6232b36a5b69bd4590221e1435b/drafthorse-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "fe6af406e14c0e8728316db5703b6d71", "sha256": "0a8f30ef7c45cb4e71c680673dd6fbff14d21ac6078e4c1f2adc7fb774ed5ae1" }, "downloads": -1, "filename": "drafthorse-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "fe6af406e14c0e8728316db5703b6d71", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 81201, "upload_time": "2018-12-12T15:03:04", "url": "https://files.pythonhosted.org/packages/0c/dc/9f375b4c4fad82664d194012aea12c0a455bf1c567983be0e8ec3761d9f3/drafthorse-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4bfb718c5d56c67c6aee819ce37e204", "sha256": "9cfbe58b38570d1e5acfdd24604e823a5db0f2a87e20dd3ac315924194ede6ee" }, "downloads": -1, "filename": "drafthorse-1.1.1.tar.gz", "has_sig": false, "md5_digest": "f4bfb718c5d56c67c6aee819ce37e204", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 73767, "upload_time": "2018-12-12T15:03:07", "url": "https://files.pythonhosted.org/packages/18/6e/84b2e21ec642b0a448b99ae1ee9be4eeb0165398cc27d3b253082c0e664b/drafthorse-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fe6af406e14c0e8728316db5703b6d71", "sha256": "0a8f30ef7c45cb4e71c680673dd6fbff14d21ac6078e4c1f2adc7fb774ed5ae1" }, "downloads": -1, "filename": "drafthorse-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "fe6af406e14c0e8728316db5703b6d71", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 81201, "upload_time": "2018-12-12T15:03:04", "url": "https://files.pythonhosted.org/packages/0c/dc/9f375b4c4fad82664d194012aea12c0a455bf1c567983be0e8ec3761d9f3/drafthorse-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4bfb718c5d56c67c6aee819ce37e204", "sha256": "9cfbe58b38570d1e5acfdd24604e823a5db0f2a87e20dd3ac315924194ede6ee" }, "downloads": -1, "filename": "drafthorse-1.1.1.tar.gz", "has_sig": false, "md5_digest": "f4bfb718c5d56c67c6aee819ce37e204", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 73767, "upload_time": "2018-12-12T15:03:07", "url": "https://files.pythonhosted.org/packages/18/6e/84b2e21ec642b0a448b99ae1ee9be4eeb0165398cc27d3b253082c0e664b/drafthorse-1.1.1.tar.gz" } ] }