{ "info": { "author": "Moses Palm\u00e9r", "author_email": "moses.palmer@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "TrueLicense compatible license manager for Python\n=================================================\n\nThis package supports managing licenses one the format used by the Java package\n`TrueLicense `_. Only the version 1 format is\nsupported.\n\nPlease see the *TrueLicense* home page for an exhaustive reference of the\nlicense format, or `Quick license format description`_ below.\n\n\nQuick license format description\n--------------------------------\n\nA license has a validity window in time, an issuer, a holder and various meta\ndata.\n\nIt is signed by the holder, and the signature can be verified using the issuer\ncertificate.\n\nThe license file is also encrypted with a key derived from a password.\n\n\nQuick library reference\n-----------------------\n\nThe main class exported by *truepy* is ``truepy.License``.\n\n- To generate a new license, use the class method ``truepy.License.issue``.\n- To load a license from a file or stream, use the class method\n ``truepy.License.load``.\n- To save a license to a file or stream, use the method\n ``truepy.License.store``.\n- To verify the signature of a license, use the method\n ``truepy.License.verify``.\n- To read license information, use the ``truepy.License.license_data``\n attribute; this is of the type ``truepy.LicenseData``.\n\nLoading and storing licenses requires only the license password; these\noperations do not perform signing and signature verification.\n\nIssuing a new license requires the private key of the issuer certificate.\n\nVerifying a license signature requires the issuer certificate.\n\n\nQuick application reference\n---------------------------\n\nPlease run the application with ``python -m truepy -h`` for more information.\n\n\nUsage\n-----\n\nThis section describes how to configure a system to use *truepy*.\n\nConfiguration includes installing *truepy*, generating an issuer certificate,\ngenerating licenses and validating licenses.\n\n\nInstallation\n~~~~~~~~~~~~\n\nTo install *truepy*, run the following command::\n\n pip install truepy\n\n\nGenerating an issuer certificate\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis functionality in not included in *truepy*. The recommended tool to use is\n`OpenSSL `_. To issue a certificate and generate a\nprivate key, run the following command::\n\n openssl req -x509 \\\n -newkey rsa:4096 \\\n -keyout key.pem \\\n -out certificate.pem \\\n -days $VALIDITY\n\nThis will prompt you for a password to protect the private key, and some other\ninformation to be included in the certificate.\n\nThe most important pieces of information are the password, which you will need\nlater, and the ``$VALIDITY``. The command line argument ``-days`` passed to\n*OpenSSL* determines how many days the certificate will be valid. Be sure not to\nset a too low value, as you will ne be able to use the certificate after this\nnumber of days have passed.\n\n\nIssuing licenses\n~~~~~~~~~~~~~~~~\n\nOnce you have a certificate and a private key, you can start issuing licenses.\nThe code below shows the minimum steps required::\n\n from cryptography.hazmat import backends\n from cryptography.hazmat.primitives import serialization\n\n from truepy import LicenseData, License\n\n\n # Load the certificate\n with open('certificate.pem', 'rb') as f:\n certificate = f.read()\n\n # Load the private key\n with open('key.pem', 'rb') as f:\n key = serialization.load_pem_private_key(\n f.read(),\n password=b'MySecretPassword',\n backend=backends.default_backend())\n\n # Issue the license\n license = License.issue(\n certificate,\n key,\n license_data=LicenseData(\n '2016-10-01T00:00:00',\n '2020-10-01T00:00:00'))\n\n # Store the license\n with open('license.key', 'wb') as f:\n license.store(f, b'LicensePassword')\n\nPlease note the second parameter to ``License.store``. It is a password used to\nderive an encryption key to encrypt the final license data. It is not secret, as\nit will need to be available to the application verifying the license.\n\n\nValidating licenses\n~~~~~~~~~~~~~~~~~~~\n\nTo validate a license, you will need the certificate used in the step above, as\nwell as the password used to encrypt the final license data. The code below\nshows the minimum steps required::\n\n from truepy import License\n\n\n # Load the certificate\n with open('certificate.pem', 'rb') as f:\n certificate = f.read()\n\n # Load the license\n with open('license.key', 'rb') as f:\n license = License.load(f, b'LicensePassword')\n\n # Verify the license; this will raise License.InvalidSignatureException if\n # the signature is incorrect\n license.verify(certificate)\n\n\nRelease Notes\n=============\n\n2.0.3 - Updated documentation\n-----------------------------\n* Updated documentation to be compatible with *Python 3*.\n\n\n2.0.2 - Corrected handling of DSA keys\n--------------------------------------\n* Corrected bug in reading of DSA keys.\n* Updated documentation.\n\n\n2.0.1 - Corrected documentation\n-------------------------------\n* Changed declared type of parameter to ``License.issue``.\n\n\n2.0 - No dependency on *OpenSSL*\n--------------------------------\n* Changed certificate and signature verification routines to use\n ``cryptography`` instead of ``pyOpenSSL``.\n\n This changes all methods that take a certificate or a key as parameter.\n\n\n1.0.1 - License Data Bugfix\n---------------------------\n* Changed ``truepy.LicenseData.information`` to ``info`` to be compatible with\n *TrueLicense*.\n\n\n1.0 - Initial Release\n---------------------\n* Support for basic license operations for TrueLicense version 1 licenses\n", "description_content_type": "", "docs_url": "https://pythonhosted.org/truepy/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/moses-palmer/truepy", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "truepy", "package_url": "https://pypi.org/project/truepy/", "platform": "linux", "project_url": "https://pypi.org/project/truepy/", "project_urls": { "Homepage": "https://github.com/moses-palmer/truepy" }, "release_url": "https://pypi.org/project/truepy/2.0.3/", "requires_dist": null, "requires_python": "", "summary": "A Python library to create TrueLicense license files.", "version": "2.0.3" }, "last_serial": 4481281, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "5bc254b014c1efc2a70abc64c0c6a473", "sha256": "f3c170dd2414a42eca566a5fc768dc467334b84bb7f506b68fa85eaa77ea4c74" }, "downloads": -1, "filename": "truepy-1.0.tar.gz", "has_sig": false, "md5_digest": "5bc254b014c1efc2a70abc64c0c6a473", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11158, "upload_time": "2014-05-18T18:51:49", "url": "https://files.pythonhosted.org/packages/ba/fd/e5c10b2e274292de5c53651b9510d98ef6be5b3a70f7fe50bc4ad216663f/truepy-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b4fd714fce72a335730fa437f66873a6", "sha256": "ac6c3abadc3e8e11c01336a781e8f84ec50ce54244e34ba0e6f8e7ea5b7d5956" }, "downloads": -1, "filename": "truepy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b4fd714fce72a335730fa437f66873a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11474, "upload_time": "2014-06-11T07:58:24", "url": "https://files.pythonhosted.org/packages/d1/50/58806ae9175e2ebb563774413f654444acc2c92b352a8b362430953c43e2/truepy-1.0.1.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "2d16bef823e44b53f102bfef2a8a8bc1", "sha256": "62b31c29cefd30d29bd37216b59b8d4184776ea28ad98607b5bd557e9b40d290" }, "downloads": -1, "filename": "truepy-2.0.zip", "has_sig": false, "md5_digest": "2d16bef823e44b53f102bfef2a8a8bc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20043, "upload_time": "2015-08-24T21:39:32", "url": "https://files.pythonhosted.org/packages/e2/5d/0ab1c841764d5a051be9c00b2002017bd1c357f8cecba46a3a42ee50895b/truepy-2.0.zip" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "fda50a062654f9378d9ecfe01ef105ac", "sha256": "1fb71dbe0992e4266c7c20d5549576792df6ed329f32c54e4159ad5d5107df6b" }, "downloads": -1, "filename": "truepy-2.0.1.tar.gz", "has_sig": false, "md5_digest": "fda50a062654f9378d9ecfe01ef105ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12309, "upload_time": "2015-08-24T21:43:38", "url": "https://files.pythonhosted.org/packages/5a/8a/57fd17bf2a2203231ada74fd1b23994b614d05d66510db0dbe10b7bf6b82/truepy-2.0.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "8046733bf4ccc2f653205a4f20919bdc", "sha256": "38341200739354b9922dd929a83ab660f2882a49a277a4720d088106e51700e1" }, "downloads": -1, "filename": "truepy-2.0.1.win32.exe", "has_sig": false, "md5_digest": "8046733bf4ccc2f653205a4f20919bdc", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 216049, "upload_time": "2015-08-31T12:20:04", "url": "https://files.pythonhosted.org/packages/33/a9/acab835e551da09f0abe2632eb8cad8954dd772a166d324f5c6f61d3fcb3/truepy-2.0.1.win32.exe" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "5f68c772f9be5a6b5ab60486eddafde9", "sha256": "346e745849a5bacc03fab9a2e442870a922e36c351145892513700387cc696de" }, "downloads": -1, "filename": "truepy-2.0.2-py3.5.egg", "has_sig": false, "md5_digest": "5f68c772f9be5a6b5ab60486eddafde9", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 17962, "upload_time": "2016-09-14T19:57:33", "url": "https://files.pythonhosted.org/packages/64/67/9a34f73069f8258ee5532a7b9bff330f5e032a72ba5c0aab91845a4050c7/truepy-2.0.2-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "493ab923ccfbd8848eedf25d4c3089ae", "sha256": "c5a9d9c442e0ce4ad021b8a355c1b668634a31999d0b517c706914787d10263d" }, "downloads": -1, "filename": "truepy-2.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "493ab923ccfbd8848eedf25d4c3089ae", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 21178, "upload_time": "2016-09-14T19:57:31", "url": "https://files.pythonhosted.org/packages/37/ed/6bb19d74a72cbb51949b2ad6080b954d0472090cecb04039d5fa299b2396/truepy-2.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3fa3e4721277ef0967afafb208cfcd70", "sha256": "89c9e2b6dffb20eeb4202c601304d0d36c2f5d3ec7fdbfdd6628cb59b5fcebd7" }, "downloads": -1, "filename": "truepy-2.0.2.tar.gz", "has_sig": false, "md5_digest": "3fa3e4721277ef0967afafb208cfcd70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13933, "upload_time": "2016-09-14T19:57:29", "url": "https://files.pythonhosted.org/packages/1d/cb/04cbd7e6a132aa4b0782a32163b13180d65505d9f919be64c52d02664b0d/truepy-2.0.2.tar.gz" } ], "2.0.3": [ { "comment_text": "", "digests": { "md5": "0011a1c044b2c49603c088620b7d1db0", "sha256": "8599d76558a4b43620c6db9ed742c20689edc9bdd93140b26163f109d376c131" }, "downloads": -1, "filename": "truepy-2.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0011a1c044b2c49603c088620b7d1db0", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 18819, "upload_time": "2018-11-13T10:36:37", "url": "https://files.pythonhosted.org/packages/2a/7d/a593056bf559593ce623b8737e13d3f365a21e96993bfea98b4e34d06aa9/truepy-2.0.3-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0011a1c044b2c49603c088620b7d1db0", "sha256": "8599d76558a4b43620c6db9ed742c20689edc9bdd93140b26163f109d376c131" }, "downloads": -1, "filename": "truepy-2.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0011a1c044b2c49603c088620b7d1db0", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 18819, "upload_time": "2018-11-13T10:36:37", "url": "https://files.pythonhosted.org/packages/2a/7d/a593056bf559593ce623b8737e13d3f365a21e96993bfea98b4e34d06aa9/truepy-2.0.3-py3-none-any.whl" } ] }