{ "info": { "author": "Alireza Savand", "author_email": "alireza.savand@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development" ], "description": "Short URL Generator\n===================\n\n.. image:: https://travis-ci.org/Alir3z4/python-short_url.png\n :alt: travis-cli tests status for short_url\n :target: https://travis-ci.org/Alir3z4/python-short_url\n \n.. image:: http://badge.kloud51.com/pypi/v/short_url.svg\n :target: https://pypi.python.org/pypi/short_url\n :alt: PyPI Version\n\n.. image:: http://badge.kloud51.com/pypi/s/short_url.svg\n :target: https://pypi.python.org/pypi/short_url\n :alt: PyPI Status\n\n.. image:: http://badge.kloud51.com/pypi/l/short_url.svg\n :target: https://pypi.python.org/pypi/short_url\n :alt: PyPI License\n\n.. image:: http://badge.kloud51.com/pypi/f/short_url.svg\n :target: https://pypi.python.org/pypi/short_url\n :alt: PyPI Format\n\n.. image:: http://badge.kloud51.com/pypi/p/short_url.svg\n :target: https://pypi.python.org/pypi/short_url\n :alt: PyPI Py_versions\n\n.. image:: http://badge.kloud51.com/pypi/i/short_url.svg\n :target: https://pypi.python.org/pypi/short_url\n :alt: PyPI Implementation\n\n.. image:: http://badge.kloud51.com/pypi/e/short_url.svg\n :target: https://pypi.python.org/pypi/short_url\n :alt: PyPI Egg\n\nPython implementation for generating Tiny URL- and bit.ly-like URLs.\n\nA bit-shuffling approach is used to avoid generating consecutive, predictable\nURLs. However, the algorithm is deterministic and will guarantee that no\ncollisions will occur.\n\nThe URL alphabet is fully customizable and may contain any number of\ncharacters. By default, digits and lower-case letters are used, with\nsome removed to avoid confusion between characters like o, O and 0. The\ndefault alphabet is shuffled and has a prime number of characters to further\nimprove the results of the algorithm.\n\nThe block size specifies how many bits will be shuffled. The lower BLOCK_SIZE\nbits are reversed. Any bits higher than BLOCK_SIZE will remain as is.\nBLOCK_SIZE of 0 will leave all bits unaffected and the algorithm will simply\nbe converting your integer to a different base.\n\nThe intended use is that incrementing, consecutive integers will be used as\nkeys to generate the short URLs. For example, when creating a new URL, the\nunique integer ID assigned by a database could be used to generate the URL\nby using this module. Or a simple counter may be used. As long as the same\ninteger is not used twice, the same short URL will not be generated twice.\n\nThe module supports both encoding and decoding of URLs. The min_length\nparameter allows you to pad the URL if you want it to be a specific length.\n\nSample Usage:\n\n>>> import short_url\n>>> url = short_url.encode_url(12)\n>>> print url\nLhKA\n>>> key = short_url.decode_url(url)\n>>> print key\n12\n\nUse the functions in the top-level of the module to use the default encoder.\nOtherwise, you may create your own UrlEncoder object and use its encode_url\nand decode_url methods.\n\n\nInstall\n-------\n\n**short_url** is also available at pypi:\n\nhttp://pypi.python.org/pypi/short_url\n\nGive a try to your finger:\n\n::\n\n $ pip install short_url\n\nAnd done ;)\n\n\nTests\n-----\n\n``short_url`` is tested on both `python2` and `python3`, to run the tests:\n\n::\n\n $ tox\n\n\n----\n\n========== ======\nSource https://github.com/Alir3z4/short_url\nWebsite http://alir3z4.github.com/short_url\nIssues https://github.com/Alir3z4/short_url/issues\nPyPi http://pypi.python.org/pypi/short_url\nAuthor Michael Fogleman\nMaintainer Alireza Savand\nLicense MIT\nLink http://code.activestate.com/recipes/576918/\n========== ======", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Alir3z4/short_url", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "short_url", "package_url": "https://pypi.org/project/short_url/", "platform": "OS Independent", "project_url": "https://pypi.org/project/short_url/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Alir3z4/short_url" }, "release_url": "https://pypi.org/project/short_url/1.2.2/", "requires_dist": null, "requires_python": null, "summary": "Python implementation for generating Tiny URL- and bit.ly-like URLs.", "version": "1.2.2" }, "last_serial": 2143145, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "e9ae749f0d017c740816b0709a14aa69", "sha256": "3a75be4347493f603dd9be004e78570f9d6c9edb6e00c5f6266ff0a6aadbf3c1" }, "downloads": -1, "filename": "short_url-1.0.tar.gz", "has_sig": false, "md5_digest": "e9ae749f0d017c740816b0709a14aa69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3254, "upload_time": "2012-11-23T18:21:50", "url": "https://files.pythonhosted.org/packages/90/64/c6312461213187c5867afd02b2111307193df70d68c4ca6a2334203b68db/short_url-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "e001f22d7b7905ba0c607240a218d84c", "sha256": "cc8f76ddf564885b77046ff25df4ce4edd6642a204919f7b2525d34e67481f52" }, "downloads": -1, "filename": "short_url-1.1.tar.gz", "has_sig": false, "md5_digest": "e001f22d7b7905ba0c607240a218d84c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3506, "upload_time": "2013-11-29T23:49:39", "url": "https://files.pythonhosted.org/packages/df/97/7f3e9131eb5ede4eb6ec1d190f4ac1f4fb3b1b4e5f69c134346e5c648e1a/short_url-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "792b11d74522ef4f5c295b1497565246", "sha256": "3dd9bbd96ae9876f46bdad94a66d72663c8efbeb983f008c055243d2cea68c3e" }, "downloads": -1, "filename": "short_url-1.2.tar.gz", "has_sig": false, "md5_digest": "792b11d74522ef4f5c295b1497565246", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4085, "upload_time": "2014-01-18T18:38:44", "url": "https://files.pythonhosted.org/packages/e6/82/657b3e2258d167c0634d9447f71e1143547b9ccf3a4cc50428d37144ef88/short_url-1.2.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "d8a72bc78eb920e2e796ac8cfaf4b526", "sha256": "3b5240888af2a9d99ab216e5b90724b679c4992995cf579267790b010f9f6948" }, "downloads": -1, "filename": "short_url-1.2.1.tar.gz", "has_sig": false, "md5_digest": "d8a72bc78eb920e2e796ac8cfaf4b526", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4106, "upload_time": "2014-01-18T20:27:18", "url": "https://files.pythonhosted.org/packages/2c/bd/1ebd545ede16687b54f84745845f4c22e512aa334cf272d0ce407a5d2508/short_url-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "fe6d935876be895c3ffe325b38f3d736", "sha256": "ef56fa8b21a946efd1ee518647c40154dbb7c43aaff6851405e9e3d5befcd04f" }, "downloads": -1, "filename": "short_url-1.2.2.tar.gz", "has_sig": false, "md5_digest": "fe6d935876be895c3ffe325b38f3d736", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4321, "upload_time": "2016-05-31T18:23:35", "url": "https://files.pythonhosted.org/packages/c5/33/0837510726656dfda6439d3de085e1f994cf91d9c1a95bc0a87051b27970/short_url-1.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fe6d935876be895c3ffe325b38f3d736", "sha256": "ef56fa8b21a946efd1ee518647c40154dbb7c43aaff6851405e9e3d5befcd04f" }, "downloads": -1, "filename": "short_url-1.2.2.tar.gz", "has_sig": false, "md5_digest": "fe6d935876be895c3ffe325b38f3d736", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4321, "upload_time": "2016-05-31T18:23:35", "url": "https://files.pythonhosted.org/packages/c5/33/0837510726656dfda6439d3de085e1f994cf91d9c1a95bc0a87051b27970/short_url-1.2.2.tar.gz" } ] }