{ "info": { "author": "David Ireland", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [], "description": "A Python interface to FirmaSAT\r\n==============================\r\n\r\nThis is a Python interface to the core FirmaSAT library, which must be\r\ninstalled on your system. FirmaSAT is available from\r\nhttp://www.cryptosys.net/firmasat/.\r\n\r\nClasses\r\n-------\r\n\r\n**Sello**\r\n Operates on the sello (signature) node in a SAT XML document.\r\n\r\n**Tfd**\r\n Operates on the Timbre Fiscal Digital (TFD) element, if present.\r\n\r\n**Pkix**\r\n PKI X.509 security utilities. Operates on private keys and\r\n X.509 certificates.\r\n\r\n**Xmlu**\r\n XML utilities. Operates on SAT-specific XML documents.\r\n\r\n**Gen**\r\n General info about the core library DLL, e.g. version\r\n number, compile date.\r\n\r\n**Err**\r\n Details of errors returned by the core library DLL.\r\n\r\nAll code in is one module ``firmasat.py`` for simplicity of\r\ndistribution. All methods are static methods.\r\n\r\nErrors\r\n------\r\n\r\nMost errors (missing files, invalid format) will result in a\r\n``firmasat.Error`` exception, although some methods are more forgiving\r\nand will return a negative error code instead. Passing a bad argument type\r\nwill result in an ``ArgumentError`` exception\r\n\r\nWe're not entirely sure about being this brutal with exceptions. We'd\r\nappreciate comments.\r\n\r\nWe may refine the method names and the exception behaviour in a future\r\nrelease. If you have feedback or suggestions, please contact us at\r\nhttp://www.cryptosys.net/contact/.\r\n\r\nExamples\r\n--------\r\n\r\nTo use in Python's REPL:\r\n\r\n::\r\n\r\n >>> from firmasat import *\r\n >>> Gen.version()\r\n 70310\r\n\r\nIf you don't like ``import *`` and find ``firmasat`` a bit long to type\r\neach time, try\r\n\r\n::\r\n\r\n >>> import firmasat as fs\r\n >>> fs.Gen.version()\r\n 70310\r\n\r\nTo sign a CFDI document, create the base XML file with all the required\r\ndata except the following nodes\r\n\r\n::\r\n\r\n sello=\"\"\r\n certificado=\"\"\r\n noCertificado=\"00000000000000000000\"\r\n\r\nThen run the ``Sello.sign_xml()`` method with full paths to your ``key``\r\nand ``cer`` files.\r\n\r\n::\r\n\r\n n = Sello.sign_xml('new.xml', 'base.xml', \"emisor.key\", password, \"emisor.cer\")\r\n\r\nThis creates a new file ``new.xml`` with the sello and certificado nodes\r\ncompleted.\r\n\r\nTests\r\n-----\r\n\r\nThere is a series of tests in ``test/test_firmasat.py``. This requires a\r\nsubdirectory ``work`` in the same folder as the ``test_firmasat.py``\r\nmodule which must contain all the required test files (available in\r\n``firmasatPyTestFiles.zip``). The test function then creates a temporary\r\nsubdirectory which is deleted automatically (add the argument\r\n``nodelete`` on the command line to keep this temp directory).\r\n\r\n::\r\n\r\n test/\r\n test_firmasat.py # this module\r\n work/ # this _must_ exist\r\n \r\n tmp.XXXXXXXX/ # created by `setup_temp_dir()`\r\n \r\n \r\n\r\nThis structure is already set up in the distribution file, so unzip the\r\nfile ``firmasat-x.x.x.zip`` and open a command-line prompt in the\r\n``test`` subdirectory. You can do any of the following.\r\n\r\n1. ``python test_firmasat.py``\r\n\r\n2. ``py.test -v``\r\n\r\n3. Open the file ``test_firmasat.py`` using IDLE and select\r\n ``Run > Run Module (F5)``.\r\n\r\nWe've tested this using the Python 2.7.12 interpreter and IDLE, the\r\nPyDev environment in Eclipse, and using ``py.test``.\r\n\r\nSystem requirements\r\n-------------------\r\n\r\nWindows platforms only. Python 2 must be installed on your system (at\r\nleast 2.6). Python 3 is not supported. FirmaSAT v7.3 or above must also\r\nbe installed.\r\n\r\nContact\r\n-------\r\n\r\nFor more information or to make suggestions, please contact us at\r\nhttp://www.cryptosys.net/contact/.\r\n\r\n| David Ireland\r\n| DI Management Services Pty Ltd\r\n| Australia\r\n| http://www.cryptosys.net/contact/\r\n| 28 August 2016\r\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.cryptosys.net/firmasat/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "firmasatpy", "package_url": "https://pypi.org/project/firmasatpy/", "platform": "Windows", "project_url": "https://pypi.org/project/firmasatpy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.cryptosys.net/firmasat/" }, "release_url": "https://pypi.org/project/firmasatpy/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Python interface to CryptoSys FirmaSAT", "version": "0.1.1" }, "last_serial": 2309426, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "88d41f0543cee35204b5a53b96ca0b24", "sha256": "b27fbb93ae111651a821e7877e36702529562302f43fa1bbc57af802fe5c64ff" }, "downloads": -1, "filename": "firmasatpy-0.1.1.zip", "has_sig": false, "md5_digest": "88d41f0543cee35204b5a53b96ca0b24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 114163, "upload_time": "2016-08-28T12:31:20", "url": "https://files.pythonhosted.org/packages/f4/37/c4f808e101d431afe23640684e1d63d5d4b397cf27858f1adafd6a7242d0/firmasatpy-0.1.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "88d41f0543cee35204b5a53b96ca0b24", "sha256": "b27fbb93ae111651a821e7877e36702529562302f43fa1bbc57af802fe5c64ff" }, "downloads": -1, "filename": "firmasatpy-0.1.1.zip", "has_sig": false, "md5_digest": "88d41f0543cee35204b5a53b96ca0b24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 114163, "upload_time": "2016-08-28T12:31:20", "url": "https://files.pythonhosted.org/packages/f4/37/c4f808e101d431afe23640684e1d63d5d4b397cf27858f1adafd6a7242d0/firmasatpy-0.1.1.zip" } ] }