{ "info": { "author": "Sunny Yiu", "author_email": "sun@yiu.co", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: ISC License (ISCL)", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Security" ], "description": "random-cli\n==========\n\n.. image:: https://img.shields.io/pypi/v/random_cli.svg\n :target: https://pypi.org/project/random_cli\n.. image:: https://img.shields.io/badge/python-3.6%2B-blue.svg\n.. image:: https://img.shields.io/github/license/sunnz/random-cli.py.svg\n.. image:: https://img.shields.io/badge/readme%20style-standard-brightgreen.svg\n :target: https://github.com/RichardLitt/standard-readme\n\na cli app that simply generates 64 random alphanumeric characters.\n\nfor example::\n\n $ random\n vBDkKl1JqyeUu4n8ygrF0JflP6odhRnYSaxtND1dUSauNnUj7JDI9DHEYGs9FHhk\n\nI am kind of sick and tired of not being able to generate a simple alphanumeric\nrandom string for passwords or what not without relying on a web browser.\n\nI really like something in the terminal so that it is kind of temporary yet I\ncan copy and paste it when I need it, and be able to simply close the terminal\nwindow when I am done.\n\nI find it surprising that there is no simple cli app to do this... I resort to\ndoing things like ``dd if=/dev/urandom count=1 | base64``, but this is not\nideal, it is a long command and just not very configurable. most of the time I\njust want a simple alphanumeric string but base64 gives all kinds of things,\nwhich is great for what it is, but not really intended for what I am doing most\nof the time.\n\nso here it is, a purpose built cli app just for generating random alphanumeric\nstrings.\n\nsecurity\n--------\n\n- random_cli is entirely hosted on the client machine, no internet connection\n is ever used after installation.\n\n- randomness is provided by the python secrets module, introduced in python\n 3.6: .\n\n - the secrets module uses best source of cryptographic randomness provided\n by the operating system. on linux, that may be ``/dev/urandom``. they are\n suitable for managing data such as passwords, account authentication,\n security tokens, and related secrets.\n\n- **disclaimer**: this project has not been security audited. while secrets\n module is cryptographically strong, you should do your own assessment if\n this project is suitable for your specific use case.\n\ninstall\n-------\n\nrandom_cli requires python 3.6 or higher as random_cli uses the new\nsecrets module introduced in python 3.6.\n\nyou can install random_cli from pypi, or from source.\n\nto install system wide from pypi with pip::\n\n sudo python3 -m pip install random_cli\n\nI use \"flit\" to build and publish random_cli, so \"flit\" is required\nif you want install from source::\n\n sudo python3 -m pip install flit\n\nthen you can build and install random_cli from source::\n\n git clone https://github.com/sunnz/random-cli.py random_cli\n cd random_cli\n flit install\n\nthat would install random_cli into your home directory.\n\nto install system wide from source, instead of ``flit install``, run::\n\n sudo su\n FLIT_ROOT_INSTALL=1 flit install\n exit\n\nusage\n-----\n\nusage: ``random [OPTIONS] [LENGTH]``\n\noptions::\n\n --type TEXT alphanumeric (default), print, letters, lower, upper, hex\n --help Show this message and exit.\n\n``options`` and ``length`` is optional, default to 64 characters.\n\nexamples::\n\n $ random\n 6aNaxiFpAtNCYAnyb7LjBCVS9ktQL2QNj1qDYUCvrUDctY4e4DFWMKz23CPmY0Of\n\n $ random 10\n 8WsApVMknV\n\n $ random --type print\n 0e;:e&%cghH-|/fo4L$tSrn&O'nOavWSfl\"\\1pW9Q4tO~}-eS2?C4N,PKv/XEX^?\n\n $ random --type letters\n UYUgcmuILkxiIsdHDRPOuCcxaOSIHryJHvTHRtOwPRnSqlsTIjTXheSVonhsPpWh\n\n $ random --type lower\n quthvsoxiqpipnigvzsjxugmbryczokqffyzmejhibktoitaszhtexgrptodgqnw\n\n $ random --type upper\n SAVGDFKDJRRSUFOGQOWYGEBKLPHMQXSSRCVLQHXZCAXRVJYOZERIMCPIINMZWDQK\n\n $ random --type hex\n 85Bb8BaA8c3fbBcdbF3BAF7a7EeE0E8Aa2D22b87BA0EC315603A6cCaC27dBF9A\n\nrandom_cli generates 64 random alphanumeric characters by default if no options\nand length are given.\n\nyou should not get exactly the same results as above examples as random_cli\npicks random characters from the given options. (you would be extremely lucky\nif you do, as that equates to winning the lotto serveral times in a row!!)\n\nruntime error\n-------------\n\nif you see something like this error::\n\n Traceback (most recent call last):\n ...\n RuntimeError: Click will abort further execution because Python 3 was\n configured to use ASCII as encoding for the environment.\n ...\n\nthis can be fixed by exporting the locale to the encoding of choice. for\nexample, I am using australian english, so I would set my locale to\n``en_AU.utf8`` by running the following::\n\n export LC_ALL=en_AU.utf8\n export LANG=en_AU.utf8\n\nthe set the locale permanently, this repo provides a script ``locale.sh``\nunder ``shell-scripts``. copy it to ``/etc/profile.d/locale.sh``.\n\nsee python 3 surrogates for more information:\n.\n\ndevelopment\n-----------\n\nsetup virtualenv::\n\n python3 -m venv venv\n source venv/bin/activate\n python -m pip install -r requirements.txt\n\nfrom this point we assume that python refers to python 3 in virtualenv.\n\nto run unit test (via python 3 pytest module)::\n\n python -m pytest --flake8 --cache-clear -v\n\nto build command for testing (e.g. within virtualenv)::\n\n flit install\n\nafter which you can run it by running ``random`` in the terminal in virtualenv.\nto rebuild simply run ``flit install`` again.\n\ncontribute\n----------\n\nyou are very welcomed to open issues and/or submit pull requests on github:\n.\n\nthis project follows standard-readme specification:\n.\n\nif you find this project useful and would like to tip me over bitcoin, here's\nmy bitcoin tipping address: ``1P1v6k1Qr9Ad3fMLrtgj5PQjYLyZdjqLZP``.\n100% optional, it would totally be an awesome encouragement, no matter what\nthe amount is! :)\n\nlicence\n-------\n\nisc (c) sunnz .\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/sunnz/random-cli.py", "keywords": "", "license": "ISC", "maintainer": "", "maintainer_email": "", "name": "random_cli", "package_url": "https://pypi.org/project/random_cli/", "platform": "", "project_url": "https://pypi.org/project/random_cli/", "project_urls": { "Homepage": "https://github.com/sunnz/random-cli.py" }, "release_url": "https://pypi.org/project/random_cli/1.0.1/", "requires_dist": [ "Click (>=5,<7)" ], "requires_python": "~=3.6", "summary": "a cli app that simply generates a random 64 character alphanumeric string.", "version": "1.0.1" }, "last_serial": 3654467, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "795360d3f133b8d6a350c7bb10c972df", "sha256": "ea784cd743441a58ce2ff56d637ae273a93f45fb0d554d54dff539d5971c7847" }, "downloads": -1, "filename": "random_cli-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "795360d3f133b8d6a350c7bb10c972df", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": "~=3.6", "size": 4691, "upload_time": "2018-02-19T12:16:23", "url": "https://files.pythonhosted.org/packages/b3/f0/4766408b16a04f3371411d5e4215c598c8384999e2e01e35a4e916d3d8cf/random_cli-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0876837e1e33ef5cb176c05bc696e739", "sha256": "ee223b69b2178712fc193d98614d5910a958abc0cd515e970380d0bafca50b82" }, "downloads": -1, "filename": "random_cli-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0876837e1e33ef5cb176c05bc696e739", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 3288, "upload_time": "2018-02-19T12:16:28", "url": "https://files.pythonhosted.org/packages/e6/e7/097ff501d11560fa6c9729abd5b92a4205de67be9846e766006ca5642903/random_cli-0.1.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "0a3da4f65aae043e0f716c2bbd3ab01f", "sha256": "44fb2b8220b37de7567e131989321f5e751391eaf15271bd54bce982384c5419" }, "downloads": -1, "filename": "random_cli-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0a3da4f65aae043e0f716c2bbd3ab01f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": "~=3.6", "size": 6566, "upload_time": "2018-03-09T13:40:27", "url": "https://files.pythonhosted.org/packages/0e/de/f7b603bc8f3611c72e30332343573d90165816f28ecf2e197920f7973806/random_cli-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57c41b562554ec81f5a6f4ffdd931f3c", "sha256": "2f203375489ac3c62da50505ae15bc1d3d9dde3734f367da29c7e7a5b2569d5b" }, "downloads": -1, "filename": "random_cli-1.0.0.tar.gz", "has_sig": false, "md5_digest": "57c41b562554ec81f5a6f4ffdd931f3c", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 5103, "upload_time": "2018-03-09T13:40:33", "url": "https://files.pythonhosted.org/packages/82/65/951dbb4657c8a6f61ba2e0d09121fd89cd6099a8e232ac1f882a84e98eda/random_cli-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "79234b766902fa631849c6f3f8383ae8", "sha256": "665ffdd7ebf0b5cce5ae22f7ca2bdbb5bd00c2d2a9a939e5cfd0cea6ee25e3e6" }, "downloads": -1, "filename": "random_cli-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "79234b766902fa631849c6f3f8383ae8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": "~=3.6", "size": 6620, "upload_time": "2018-03-09T14:10:15", "url": "https://files.pythonhosted.org/packages/ae/18/929b2967e9506aedd9e68c6a53df921b4bdd0041b2313275800c01a92ba3/random_cli-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9818e3827a2a4648f427eaa0cb8c16ee", "sha256": "32054e7354f390da3b16a0190b41fae27ca79435462907a82e4936ab8d74e4be" }, "downloads": -1, "filename": "random_cli-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9818e3827a2a4648f427eaa0cb8c16ee", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 5173, "upload_time": "2018-03-09T14:10:21", "url": "https://files.pythonhosted.org/packages/7f/e9/d740de895dab10aed3fe6d4de681035de6a743654952c9cede59a917ccc9/random_cli-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "79234b766902fa631849c6f3f8383ae8", "sha256": "665ffdd7ebf0b5cce5ae22f7ca2bdbb5bd00c2d2a9a939e5cfd0cea6ee25e3e6" }, "downloads": -1, "filename": "random_cli-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "79234b766902fa631849c6f3f8383ae8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": "~=3.6", "size": 6620, "upload_time": "2018-03-09T14:10:15", "url": "https://files.pythonhosted.org/packages/ae/18/929b2967e9506aedd9e68c6a53df921b4bdd0041b2313275800c01a92ba3/random_cli-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9818e3827a2a4648f427eaa0cb8c16ee", "sha256": "32054e7354f390da3b16a0190b41fae27ca79435462907a82e4936ab8d74e4be" }, "downloads": -1, "filename": "random_cli-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9818e3827a2a4648f427eaa0cb8c16ee", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 5173, "upload_time": "2018-03-09T14:10:21", "url": "https://files.pythonhosted.org/packages/7f/e9/d740de895dab10aed3fe6d4de681035de6a743654952c9cede59a917ccc9/random_cli-1.0.1.tar.gz" } ] }