{ "info": { "author": "Idin", "author_email": "py@idin.ca", "bugtrack_url": null, "classifiers": [], "description": "# Lucifer\nLucifer is a Python package for creating nice and colourful progress bars using the map() and apply() method as well as for loops.\n\n## Etymology\nOld English [Lucifer](https://www.etymonline.com/word/lucifer) \"Satan,\" also \"morning star, Venus in the morning sky before sunrise,\" \nalso an epithet or name of Diana, from Latin Lucifer \"morning star,\" noun use of adjective, \nliterally \"light-bringing,\" from lux (genitive lucis) \"light\" (from PIE root *leuk- \"light, brightness\") + \nferre \"to carry, bear,\" from PIE root *bher- (1) \"to carry,\" also \"to bear children.\" Venus in the \nevening sky was Hesperus. \n\n## ProgressBar\nTo use a progress bar you need to initiate a ProgressBar object with the maximum progress amount (total) and call the show method of the object with the amount to update the progress bar.\n\n```python\nfrom lucifer import ProgressBar\nfrom time import sleep\n\nbar = ProgressBar(total=100)\n\nfor i in range(100):\n sleep(0.05)\n bar.show(amount=i+1)\n```\n\nYou can also add your own text to the progress bar.\n\n```python\nfrom lucifer import ProgressBar\nfrom time import sleep\n\nbar = ProgressBar(total=100)\nfor i in range(100):\n sleep(0.05)\n bar.show(amount=i+1, text=f'working on {i}')\n```\n\n\n## map\nYou can also use the ProgressBar's map method instead of Python's map method. The output is an iterable. As soon as you turn the iterable object into a list the progress bar will be displayed.\n\n```python\nfrom lucifer import ProgressBar\nfrom time import sleep\n\nlist1 = list(range(100))\n\ndef wait_and_double(x, wait_time):\n sleep(wait_time)\n return x*2\n\n# this will not make the progress bar appear\niterable2 = ProgressBar.map(\n function=lambda x: wait_and_double(x=x, wait_time=0.05), \n iterable=list1\n)\n\n# this will make the progress bar appear\nlist2 = list(iterable2)\n```\n\n## apply\nProgressBar also works with Panda's DataFrame and Series objects. \n\n```python\nfrom lucifer import ProgressBar\nfrom time import sleep\nfrom pandas import DataFrame\n\ndata = DataFrame({\n 'name':['Arminius', 'Boudica', 'Alaric', 'Attila', 'Genseric'],\n 'ethnicity': ['German', 'Celt', 'Goth', 'Hun', 'Vandal']\n})\n\ndata['name_and_ethnicity'] = ProgressBar.apply(\n data=data, \n function=lambda x: x['name']+' the '+x['ethnicity']\n)\n\ndata['name_lower'] = ProgressBar.apply(\n series=data['name'], \n function=lambda x: x.lower()\n)\n```\n\n## iterate\nYou can also use ProgressBar to for iterating over iterable objects, especially *for* loops.\n\n```python\nfrom lucifer import iterate\n\nfor i in iterate(range(100)):\n # do something\n pass\n```\n\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/idin/lucifer", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "lucifer", "package_url": "https://pypi.org/project/lucifer/", "platform": "", "project_url": "https://pypi.org/project/lucifer/", "project_urls": { "Homepage": "https://github.com/idin/lucifer" }, "release_url": "https://pypi.org/project/lucifer/1.3/", "requires_dist": null, "requires_python": "~=3.6", "summary": "Python library for creating progress bars", "version": "1.3" }, "last_serial": 4784112, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "02d25c8b7f73ff5b361fbb312cd36006", "sha256": "57542f70bd9e3f311103345c648622bfeeb7ac8367cd7ed21ab95752b94153f4" }, "downloads": -1, "filename": "lucifer-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "02d25c8b7f73ff5b361fbb312cd36006", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 11664, "upload_time": "2019-02-05T22:04:09", "url": "https://files.pythonhosted.org/packages/0a/7d/fad89eb968e8ed28173a0adfa70863cab9f9296ba6a65aadc10f5f52fd57/lucifer-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58ea8d46bfc11653d6cd498b4b7f4f6b", "sha256": "1ad0f2fa7e56dae9639002faa03bf4f58fa203b530daf0c6bf9fe248939638d7" }, "downloads": -1, "filename": "lucifer-1.1.tar.gz", "has_sig": false, "md5_digest": "58ea8d46bfc11653d6cd498b4b7f4f6b", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 5650, "upload_time": "2019-02-05T22:04:14", "url": "https://files.pythonhosted.org/packages/f3/39/9c598742cd05b5aff2e2210c1cee1650833bb6de45d15bbd32fa5ae4c6aa/lucifer-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "10d971ef328d3d00b46e9476504cdef9", "sha256": "d3949638dda5059c95657fd97bed054bfa4de16ff4e2b866fc0f8f9c5026a3b3" }, "downloads": -1, "filename": "lucifer-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "10d971ef328d3d00b46e9476504cdef9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 11667, "upload_time": "2019-02-05T22:04:11", "url": "https://files.pythonhosted.org/packages/4b/98/a3ec9eb462fead481843a669c795e0e7bf4513b797fb5a4eec325d744218/lucifer-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ce8ca645b0e11b81edebac6d76e8c890", "sha256": "742f642b938792d2158ad6ec2f82317ba77d6aeb01e509fee0194f9332cbceea" }, "downloads": -1, "filename": "lucifer-1.2.tar.gz", "has_sig": false, "md5_digest": "ce8ca645b0e11b81edebac6d76e8c890", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 5643, "upload_time": "2019-02-05T22:04:16", "url": "https://files.pythonhosted.org/packages/bf/c0/29169d990a4dcae505d0904e530bbfb7e9b5c327b168f29f1b87009daa52/lucifer-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "7c1c074098ae0e1a68b38c8d1964610d", "sha256": "64e4b1195ed25a5a6de54c8345073a81caa458cf8b2d52c90a20b1ac8678be6a" }, "downloads": -1, "filename": "lucifer-1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7c1c074098ae0e1a68b38c8d1964610d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 7353, "upload_time": "2019-02-05T22:12:01", "url": "https://files.pythonhosted.org/packages/c9/53/6725fd9965c36f8e7cf2fa417c3c9b7345b868c68192a8cd89a764096584/lucifer-1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06fdc0737ad9f2a6158027dc29e1d059", "sha256": "b2cb298f7b0eea1139327dd24a6bb43bfa4619ce43800e0b87ecfe083afb6af2" }, "downloads": -1, "filename": "lucifer-1.3.tar.gz", "has_sig": false, "md5_digest": "06fdc0737ad9f2a6158027dc29e1d059", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 5593, "upload_time": "2019-02-05T22:12:04", "url": "https://files.pythonhosted.org/packages/b8/06/b4e5ec093cea8b23898f6f59bf2f1609b6d88d73a963cc15f678de1fe4e0/lucifer-1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7c1c074098ae0e1a68b38c8d1964610d", "sha256": "64e4b1195ed25a5a6de54c8345073a81caa458cf8b2d52c90a20b1ac8678be6a" }, "downloads": -1, "filename": "lucifer-1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7c1c074098ae0e1a68b38c8d1964610d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 7353, "upload_time": "2019-02-05T22:12:01", "url": "https://files.pythonhosted.org/packages/c9/53/6725fd9965c36f8e7cf2fa417c3c9b7345b868c68192a8cd89a764096584/lucifer-1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06fdc0737ad9f2a6158027dc29e1d059", "sha256": "b2cb298f7b0eea1139327dd24a6bb43bfa4619ce43800e0b87ecfe083afb6af2" }, "downloads": -1, "filename": "lucifer-1.3.tar.gz", "has_sig": false, "md5_digest": "06fdc0737ad9f2a6158027dc29e1d059", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 5593, "upload_time": "2019-02-05T22:12:04", "url": "https://files.pythonhosted.org/packages/b8/06/b4e5ec093cea8b23898f6f59bf2f1609b6d88d73a963cc15f678de1fe4e0/lucifer-1.3.tar.gz" } ] }