{ "info": { "author": "Mart\u00edn Ra\u00fal Villalba", "author_email": "martin@martinvillalba.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "python-afip\n===========\n\nPython package to interact with some of Argentina's AFIP Web services.\n\n*NOTE: UNDER DEVELOPMENT. NOT FULLY IMPLEMENTED*\n\nIt implements programmatic interfaces for the following services:\n * WSAA: the token-granting service.\n * WSFE: the invoicing (\"factura\") service for the local market (type \"C\" invoices). [PARTIALLY IMPLEMENTED]\n * WSFEX: the invoice service for export operations (type \"E\" invoices).\n * WS_SR_PADRON_A5: tax payer information service (query to get info for your invoices).\n * WS_SR_PADRON_A13: same as above, but output is different.\n\nIt's designed to contain anything a _monotributista_ freelancer reasonably needs to issue\nand manipulate invoices, presumably to send something that doesn't look completely horrendous and\nunprofessional to clients (I'm looking at you, RECE et al.)\n\nThis is a Python 3 ONLY library, seeing as Python 2.7 will reach end of life in short order.\n\nThis package only contains the base interfaces to interact with AFIP's Web services. It doesn't\nimplement a DB backend to store things on, an administrative interface of any kind, or an invoice/receipt\ntemplate-to-PDF generator. It does, however, include a CLI utility to test things out.\n\nTested only on Linux as that's what I use, but there is nothing platform-specific about it. If you\nuse it on Mac/Windows/whatever and it something doesn't work, kindly submit a pull request or at least\nfile a bug.\n\nContribution in the form of bug fixes, documentation, code improvements, tests, support for additional\nservices.\n\nYou might notice there is another package available for Python to interact with AFIP's services called\npyafipws and you might be wondering why use this one instead. To that, I can tell you why I'm writing\nit:\n * This is a simpler, one-function-one-package sort of deal. Use it to build something else.\n * It runs on Python 3 (and only Python 3) out of the box.\n * The code is simpler/cleaner to understand.\n * This package tries to abstract away (i.e. hide) the inherent ugliness and the sea of inconsistencies\n in the native interfaces and gives you more natural data structures that don't make you feel like you\n are dealing with an ugly pile of XML documents and related SOAP awfulness. Because you are not, I am,\n so you don't have to.\n\nAnd just to be fair, a few reasons not to use it:\n * You want something established and better tested.\n * You need services not currently supported.\n * You don't care about Python 3 (though you should, really, it's pretty sweet).\n * You aren't looking to integrate this into something else. You want a fully built out solution.\n\n\n TODO\n ----\n * Document how to get valid certificates.\n * Document basic usage of each service.\n * Document API in code for API reference doc gen.\n * Implement WSFE.\n * Test WSFE in production.\n * Test WSFEX in production.\n * Implement output of invoices into whatever storage format AFIP requires as well as something\n nicer to deal with.\n\n\nLogging\n-------\nIn the event anything goes wrong either in this package or in your own application code, and given the\nirrevocable nature of issuing an invoice through AFIP (why?!), good logging is essential. So, all\ninterfaces run a logging plugin on the underlying SOAP client.\n\nAll you need to do is pass the _log_dir_ argument to the constructor of any WS client. You'll get\njsonlines-formatted files with every request and response sent/received along with the raw XML and\ntimestamps for whatever service you called.\n\nI strongly encourage you to use this. Worst-case scenario, you'll have a small log directory to\nclean up every now and then.\n\n\nDocumentation\n-------------\nFor now, this file is all the documentation you get. I'll be adding to it over the coming days/weeks. However,\nhere are some pointers:\n - AFIP has documentation on how to get working certificates (start with a testing certificate only).\n - Play with the CLI tool. It can call anything that's implemented and lets you interact with the different web\n services. Run \"python -m afip --help\" to get started.\n - Load your certificate into the CLI tool with the _profile_ sub-command.\n - Get usable tokens (they'll be stored for your convenience) from the WSAA service via the wsaa sub-command.\n Try \"python -m afip wsaa authorize wsfex\".\n - Interact with services you've requested tokens for (they expire after 12 hours) with the appropriate sub-command.\n Try \"python -m afip wsfex country_cuits\".\n - To see how to use it in code, import the appropriate client from the appropriately-named module and instantiate it\n with an afip.credentials.AFIPCredentials object, a log dir, and a Zeep cache of some sort. The last 2 are optional,\n but a log directory will give you crucial debugging information and a Zeep cache will speed up your app as Zeep\n (the SOAP client library) will be able to cache WSDL files. See afip.ws.WebServiceTool for a working example;\n specifically, the constructor and the _handle_ method. There is also an example of how to use each individual\n method of a client in the same file the client is defined, in the code for the CLI sub-command for it (look for\n a sub-class of WebServiceTool).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mvillalba/python-afip", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "afip", "package_url": "https://pypi.org/project/afip/", "platform": "", "project_url": "https://pypi.org/project/afip/", "project_urls": { "Homepage": "https://github.com/mvillalba/python-afip" }, "release_url": "https://pypi.org/project/afip/0.0.2/", "requires_dist": [ "requests (>=2.22.0)", "zeep (>=3.4.0)", "M2Crypto (>=0.35.2)", "python-dateutil (>=2.8.0)", "lxml (>=4.4.1)", "appdirs (>=1.4.3)" ], "requires_python": ">=3", "summary": "Python package to interact with some of Argentina's AFIP Web services.", "version": "0.0.2" }, "last_serial": 5929272, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c11e69e1f5fc91b139fdc427f995cb97", "sha256": "003baed32232d256e2c99309c23da73e5be5f739568bedd04b6fc2c421c594fd" }, "downloads": -1, "filename": "afip-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c11e69e1f5fc91b139fdc427f995cb97", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 6436, "upload_time": "2019-09-29T15:35:41", "url": "https://files.pythonhosted.org/packages/80/9c/7d6a037f85c249d0b3ec31e16f58419352c4257eb2a75499e856a8f54f29/afip-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cafdcb797ed752345404e3b959cfefb1", "sha256": "74b2512463304ce538a0e90d5e11401a3bb30a3834320e5b9be9932917332f82" }, "downloads": -1, "filename": "afip-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cafdcb797ed752345404e3b959cfefb1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 6343, "upload_time": "2019-09-29T15:36:04", "url": "https://files.pythonhosted.org/packages/b2/d3/d1c19473f632711a821616442c46c5c7d9bffa3706796a6ce716f093c79d/afip-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "9a5b8c57899a28df1f079ac4e6b28627", "sha256": "8a6cd83c72b2e1f7a6886abe82db0ebefbc129303a8371ffab83e18b2cd433ea" }, "downloads": -1, "filename": "afip-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9a5b8c57899a28df1f079ac4e6b28627", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 19919, "upload_time": "2019-10-04T16:42:11", "url": "https://files.pythonhosted.org/packages/51/8e/b4042cb5202d3e6f3abb3e8cfda48124408c02c4995975924e063c0e8e2b/afip-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "54f92afe9b26ad4dc3eb1773cef68660", "sha256": "4f0e0f77976bcef24f13e3ccb90b5d3ace08dfb4c1f0bcfe47beee9f21cd4666" }, "downloads": -1, "filename": "afip-0.0.2.tar.gz", "has_sig": false, "md5_digest": "54f92afe9b26ad4dc3eb1773cef68660", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 18875, "upload_time": "2019-10-04T16:42:13", "url": "https://files.pythonhosted.org/packages/8f/2e/0e9f9cc5d7fb3b0aa2c12e533d85b205709566efb954758cdcc73409e567/afip-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9a5b8c57899a28df1f079ac4e6b28627", "sha256": "8a6cd83c72b2e1f7a6886abe82db0ebefbc129303a8371ffab83e18b2cd433ea" }, "downloads": -1, "filename": "afip-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9a5b8c57899a28df1f079ac4e6b28627", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 19919, "upload_time": "2019-10-04T16:42:11", "url": "https://files.pythonhosted.org/packages/51/8e/b4042cb5202d3e6f3abb3e8cfda48124408c02c4995975924e063c0e8e2b/afip-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "54f92afe9b26ad4dc3eb1773cef68660", "sha256": "4f0e0f77976bcef24f13e3ccb90b5d3ace08dfb4c1f0bcfe47beee9f21cd4666" }, "downloads": -1, "filename": "afip-0.0.2.tar.gz", "has_sig": false, "md5_digest": "54f92afe9b26ad4dc3eb1773cef68660", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 18875, "upload_time": "2019-10-04T16:42:13", "url": "https://files.pythonhosted.org/packages/8f/2e/0e9f9cc5d7fb3b0aa2c12e533d85b205709566efb954758cdcc73409e567/afip-0.0.2.tar.gz" } ] }