{ "info": { "author": "Jacques Dafflon", "author_email": "jacques.dafflon@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Financial and Insurance Industry", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Topic :: Office/Business :: Financial", "Topic :: Office/Business :: Financial :: Accounting", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Swiss DTA\n=========\n.. image:: https://img.shields.io/pypi/v/swissdta.svg\n :target: https://pypi.python.org/pypi/swissdta\n :alt: Version\n.. image:: https://img.shields.io/pypi/l/swissdta.svg\n :target: https://pypi.python.org/pypi/swissdta\n :alt: License\n.. image:: https://img.shields.io/pypi/pyversions/swissdta.svg\n :target: https://pypi.python.org/pypi/swissdta\n.. image:: https://travis-ci.org/BitySA/swissdta.svg?branch=master\n :target: https://travis-ci.org/BitySA/swissdta\n :alt: Build Status\n.. image:: https://img.shields.io/codecov/c/github/BitySA/swissdta.svg\n :target: https://codecov.io/gh/BitySA/swissdta\n :alt: Codecov\n.. image:: https://img.shields.io/github/contributors/BitySA/swissdta.svg\n :target: https://github.com/BitySA/swissdta/graphs/contributors\n :alt: contributors\n\nGenerator library for Swiss DTA (\"Datentr\u00e4geraustauschverfahren\") electronic payment records loosely inspired by `python-dta `_.\n\nAuthor\n------\n`Jacques Dafflon `_ <`jacques@bity.com `_>\n\nContributors\n------------\n- `Jenny Xiao `_ <`jennyxiao@outlook.com `_>\n- `Loan Ventura `_ <`minege02@gmail.com `_>\n\nDisclaimer\n----------\nPlease review and test the library with your infrastructure before using it.\n\nThe author does not guarantee that this library will generate valid DTA records and is in no way responsible\nfor any financial issues (including but not limited to: failure of payments, payments to wrong party,\nincorrect payment amount, financial lost).\n\nBy using this library you agree to this disclaimer.\n\nLicense\n-------\nDistributed under the `MIT License `_\n\nFeatures\n--------\n\n- Support for transaction types 836, 890\n- Implements most of the validations rules specified in the `DTA Standards and Formats `_.\n- Supports `Decimal`, `date` and IBAN with or without blanks as input values\n- Automatic generation of TA 890 record\n- Automatically handle sequence numbers\n- Automatically use the sender identification for the first 5 characters of the reference (TA 836)\n- Currency code check (via `iso4217 `_)\n- Clipping of overlong Alphanumeric fields (such as addresses or purpose)\n- Automatic conversion of permitted ISO Latincode 8859-1 characters\n- Enum for fields with a constrained of valid values (e.g. `swissdta.constants.IdentificationPurpose `_)\n- Sane default values\n- Generates a sequence of properly (latin-1) encoded bytes\n- Type annotations\n\nGetting Started\n---------------\nGenerate a DTA file containing a single transaction of type 836:\n\n.. code-block:: python\n\n from datetime import datetime, timedelta\n from decimal import Decimal\n\n from swissdta import ChargesRule, DTAFile, IdentificationPurpose\n\n\n dta_file = DTAFile(sender_id='ABC12', client_clearing='8888')\n dta_file.add_836_record(reference='01234567890', # only 11 chars, the first 5 (sender id) are added automatically\n client_account='CH38 0888 8123 4567 8901 2',\n processing_date=datetime.now() + timedelta(days=1), # next day\n currency='CHF',\n amount=Decimal(10),\n client_address=('Alphabet Inc', 'Brandschenkestrasse 110', '8002 Z\u00fcrich'),\n recipient_iban='CH9300762011623852957',\n recipient_name='Herr Peter Haller',\n recipient_address=('Marktplaz 4', '9400 Rorschach'),\n identification_purpose=IdentificationPurpose.UNSTRUCTURED,\n purpose=('DTA lib example', '', ''),\n charges_rules=ChargesRule.OUR\n )\n print(dta_file.generate().decode('latin-1'))\n\n \"\"\"\n >>> print(dta_file.generate().decode('latin-1'))\n 01000000 000001708308888 ABC120000183600ABC1201234567890CH3808888123456789012 170831CHF10,\n 02 Alphabet Inc Brandschenkestrasse 110 8002 Zuerich\n 03D CH9300762011623852957\n 04Herr Peter Haller Marktplaz 4 9400 Rorschach\n 05UDTA lib example 0\n 01000000 00000170830 ABC12000028900010,\n\n \"\"\"\n\nDocumentation and Testing\n-------------------------\nTo build the documentation and run tests install the dev dependencies:\n\n.. code-block:: bash\n\n pipenv install --dev\n\nRun detox\n\n.. code-block:: bash\n\n pipenv run detox\n\n\nTo only build the documentation\n\n.. code-block:: bash\n\n pipenv run tox -e docs\n\n\nTo only run the tests\n\n.. code-block:: bash\n\n pipenv run tox -e py36\n\n\nTo only lint the code\n\n.. code-block:: bash\n\n pipenv run tox -e pylint-tests,pylint\n\n\nLimitations\n-----------\n- The account to be debited (``client_account``) for TA 836 only accepts IBAN\n- The benificiary's bank clearing number is not validated against a registry of banks to check if it is valid (TA 836).\n- No IPI reference validation if the identification purpose is set to structured (TA 836).\n- No parsing functionality of existing DTA files or records\n- Lack of tests (should be fixed soon...)\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/BitySA/swissdta", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "swissdta", "package_url": "https://pypi.org/project/swissdta/", "platform": "", "project_url": "https://pypi.org/project/swissdta/", "project_urls": { "Homepage": "https://github.com/BitySA/swissdta" }, "release_url": "https://pypi.org/project/swissdta/1.0.1/", "requires_dist": [ "iso4217", "schwifty" ], "requires_python": "", "summary": "Swiss DTA payment record (TA 836) generator library", "version": "1.0.1" }, "last_serial": 3472525, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4f95e0a50b2a365fc8036d558bd416d4", "sha256": "cbbca2b579753f6c8ce0b6a7d24cdc32007f34bd450320b7b77d9f565dd1cab5" }, "downloads": -1, "filename": "swissdta-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4f95e0a50b2a365fc8036d558bd416d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 32690, "upload_time": "2017-10-13T13:52:40", "url": "https://files.pythonhosted.org/packages/52/7b/ef7645de191fc3e62d0f397246aed65097e597281478ad810f0bb0689012/swissdta-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e20646858c46c0333843b7b010f8b90d", "sha256": "bd72f5aed459888a34d771cdc022ff6d12ec9d462caed6f277b0cc369ebda375" }, "downloads": -1, "filename": "swissdta-1.0.0.tar.gz", "has_sig": false, "md5_digest": "e20646858c46c0333843b7b010f8b90d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42070, "upload_time": "2017-10-13T13:52:42", "url": "https://files.pythonhosted.org/packages/29/3c/c26e0b0ea804ea512c1b1bff9571567807c6aa6dd905856fe97807f4970d/swissdta-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4c4966716c1ebf76177e06ca06ecacaa", "sha256": "354b22a87ba76b4624c3f7b741a4517c9f72197d1b58342d7948fa1fda29a3bf" }, "downloads": -1, "filename": "swissdta-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4c4966716c1ebf76177e06ca06ecacaa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 32724, "upload_time": "2018-01-08T23:12:35", "url": "https://files.pythonhosted.org/packages/16/f6/980d83ac7fc3a31d0c00267e1520a794f26d71fb7568310cc73580755cdd/swissdta-1.0.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4c4966716c1ebf76177e06ca06ecacaa", "sha256": "354b22a87ba76b4624c3f7b741a4517c9f72197d1b58342d7948fa1fda29a3bf" }, "downloads": -1, "filename": "swissdta-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4c4966716c1ebf76177e06ca06ecacaa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 32724, "upload_time": "2018-01-08T23:12:35", "url": "https://files.pythonhosted.org/packages/16/f6/980d83ac7fc3a31d0c00267e1520a794f26d71fb7568310cc73580755cdd/swissdta-1.0.1-py3-none-any.whl" } ] }