{ "info": { "author": "Florian Wetschoreck, Guido Drechsel, Tobias Krabel", "author_email": "info@8080labs.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Programming Language :: Python" ], "description": "# pyforest - lazy-import of all popular Python Data Science libraries. Stop writing the same imports over and over again.\n\npyforest lazy-imports all popular Python Data Science libraries so that they are always there when you need them. If you don't use a library, it won't be imported. When you are done with your script, you can export the Python code for the import statements.\n\n- [Demo in Jupyter Notebook](#demo-in-jupyter-notebook)\n- [Demo in Python Shell](#demo-in-python-shell)\n- [Using pyforest](#using-pyforest)\n- [Installation](#installation)\n- [FAQs](#frequently-asked-questions)\n- [Contributing](#contributing)\n- [Using pyforest as Package Developer](#using-pyforest-as-package-developer)\n- [About](#about)\n- [Join our community and grow further](#join-our-community-and-grow-further)\n\n\n\n## Demo in Jupyter Notebook\n![demo](examples/assets/pyforest_demo_in_jupyter.gif)\n\n\n## Demo in Python Shell\n![demo](examples/assets/pyforest_demo_in_python_shell.png)\n\n\n## Using pyforest\npyforest lazy-imports all popular Python Data Science libraries with a single line of code:\n\n```python\nfrom pyforest import *\n```\n\nAnd if you use Jupyter or IPython, you can even skip this line because pyforest adds itself to the autostart.\n\nWhen you are done with your script, you can export all import statements via:\n\n```python\nactive_imports()\n```\n\nWhich libraries are available?\n- We aim to add all popular Python Data Science libraries which should account for >99% of your daily imports. For example, `pandas` as `pd`, `numpy` as `np`, `seaborn` as `sns`, `matplotlib.pyplot` as `plt`, or `OneHotEncoder` from `sklearn` and many more. In addition, there are also helper modules like `os`, `re`, `tqdm`, or `Path` from `pathlib`.\n- You can see an overview of all available lazy imports if you type `lazy_imports()` in Python.\n- If you are missing an import, you can add it to the [pyforest imports](src/pyforest/_imports.py).\n\n> In order to gather all the most important names, we need your help. Please open a pull request and add the [imports](src/pyforest/_imports.py) that we are still missing.\n\n\n## Installation\n\n> You need Python 3.6 or above because we love f-strings.\n\nFrom the terminal, enter:\n\n`pip install pyforest`\n\nAnd you're ready to go.\n\nPlease note, that this will also add pyforest to your IPython default startup settings.\n\n\n## Frequently Asked Questions\n\n- __\"I need to always explicitly write down the libraries I used at the top of my scripts.\"__\n - Of course, you can export the import statements for all used libraries with `active_imports()`.\n\n- __\"Doesn't this slow down my Jupyter or Python startup process?\"__\n - No, because the libraries will only be imported when you actually use them. Until you use them, the variables like `pd` are only pyforest placeholders.\n\n- __\"Why can't I just use the typical IPython import?\"__\n - If you were to add all the libraries that pyforest includes, your startup time might take more than 30s.\n\n- __\"I don't have and don't need tensorflow. What will happen when I use pyforest?\"__\n - Tensorflow is included in pyforest but pyforest does not install any dependencies. You need to install your libraries separately from pyforest. Afterwards, you can access the libraries via pyforest if they are included in the [pyforest imports](src/pyforest/_imports.py).\n\n- __\"Will the pyforest variables interfere with my own local variables?\"__\n - Please make sure that you import pyforest at the beginning of your script. Then you will always be safe. You can use your variables like you would without pyforest. The worst thing that can happen is that you overwrite a pyforest placeholder and thus cannot use the placeholder any more (duh).\n\n- __\"What about auto-completion on lazily imported modules?\"__\n - It works :) As soon as you start the auto-completion, pyforest will import the module and return the available symbols to your auto-completer.\n\n- __\"How to (temporarily) deactivate the auto_import in IPython and Jupyter?\"__\n - Go to the directory `~/.ipython/profile_default/startup` and adjust or delete the `pyforest_autoimport.py` file. You will find further instructions in the file.\n\n- __\"How to (re)activate the pyforest auto_import?\"__\n - Execute the following Python command in Jupyter, IPython or Python: `from pyforest.auto_import import setup; setup()`. Please note that the auto_import only works for Jupyter and IPython.\n\n- __\"Why is pandas_profiling also imported in the demo?\"__\n - pyforest supports complementary, optional imports. For example, `pandas_profiling` patches the `pd.DataFrame` with the convenience function `df.profile_report`. Therefore, pyforest also imports `pandas_profiling` if you have it installed. If you don't have `pandas_profiling` installed, the optional import will be skipped.\n\n- __\"I don't want to copy complementary import statements to the top of my file.\"__\n - Please note, that the complementary imports will always appear at the bottom of the import_statements list. So, you can just copy all statements above. Alternatively, you can deactivate complementary imports.\n\n- __\"How to deactivate complementary imports?\"__\n - You can uncomment the statements `*.__on_import__()` at the bottom of the [pyforest imports](src/pyforest/_imports.py) file.\n\n- __\"How to add my own import statements without adding them to the package source code?\"__\n - pyforest creates a file `~/.pyforest/user_imports.py`, in which you can type any **explicit** import statements you want. **Please note:** implicit imports (e.g. `from pandas import *`) won't work. Besides, you shouldn't write implicit imports anyway. Those are only for bad programmers like the authors of pyforest :)\n\n- __\"Why is the project called pyforest?\"__\n - In which ecosystem do pandas live?\n\n\n## Contributing\nIn order to gather all the most important names, we need your help. Please open a pull request and add the imports that we are still missing to the [pyforest imports](src/pyforest/_imports.py). You can also find the guidelines in the [pyforest imports file](src/pyforest/_imports.py)\n\n\n## Using pyforest as Package Developer\npyforest helps you to minimize the (initial) import time of your package which improves the user experience. If you want your package imports to become lazy, rewrite your imports as follows:\n\nReplace\n\n```python\nimport pandas as pd\n```\n\nwith\n\n```python\nfrom pyforest import LazyImport\npd = LazyImport(\"import pandas as pd\")\n```\n\n\n## About\npyforest is developed by Florian, Tobias and Guido from [8080 Labs](https://8080labs.com). Our goal is to improve the productivity of Python Data Scientists. Other projects that we are working on are [edaviz](https://edaviz.com) and [bamboolib](https://bamboolib.com)\n\n\n## Join our community and grow further\nIf you\n- like our work or\n- want to become a faster Python Data Scientist or\n- want to discuss the future of the Python Data Science ecosystem or\n- are just interested in mingling with like-minded fellows\n\nthen, you are invited to [join our slack](https://join.slack.com/t/fasterpyds/shared_invite/enQtNzYxMTMzMDQ4MDk3LTYyNGRiNTE0OGJkNDEzZGRjNjg2Y2I0YWRlNTlmOGUxMjY5MDY5Yjg1MjliM2QwNmNhZmI3N2MxMmY3MGNiODA).", "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/8080labs/pyforest/", "keywords": "", "license": "mit", "maintainer": "", "maintainer_email": "", "name": "pyforest", "package_url": "https://pypi.org/project/pyforest/", "platform": "any", "project_url": "https://pypi.org/project/pyforest/", "project_urls": { "Documentation": "https://github.com/8080labs/pyforest/", "Homepage": "https://github.com/8080labs/pyforest/" }, "release_url": "https://pypi.org/project/pyforest/0.1.4/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Lazy-import of all popular Python Data Science libraries. Stop writing the same imports over and over again.", "version": "0.1.4" }, "last_serial": 6004455, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "efd4c1c286574e79b4ad76dc2422ec6f", "sha256": "6cdf75e0e7f9760a2c964115038abbda298b1daeb749ff52249816cae37b20b5" }, "downloads": -1, "filename": "pyforest-0.0.2.tar.gz", "has_sig": false, "md5_digest": "efd4c1c286574e79b4ad76dc2422ec6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3420892, "upload_time": "2019-08-12T20:14:59", "url": "https://files.pythonhosted.org/packages/e3/fb/af7ac4428a43cc114b1eb9c50ba608501bc99f538dbc56331bfd6f7bcaa9/pyforest-0.0.2.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "fe07c147821245d96ffee9f6f2d0f101", "sha256": "685c904461d192650519ffec8a81c2537b60b63726a8e2b363c2f6695c97337c" }, "downloads": -1, "filename": "pyforest-0.1.1.tar.gz", "has_sig": false, "md5_digest": "fe07c147821245d96ffee9f6f2d0f101", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3423698, "upload_time": "2019-08-13T14:13:33", "url": "https://files.pythonhosted.org/packages/ca/7a/2280448ba4202604eb3f9e23d9a4fd0ca1473d31aca0a90fdb5f31dd902c/pyforest-0.1.1.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "d2110265b49c4824709a7f3aa1b501be", "sha256": "9fa0b48bdddbb7bd0b42edf5d753b44a781202c1d58387b722407295814331ec" }, "downloads": -1, "filename": "pyforest-0.1.3.tar.gz", "has_sig": false, "md5_digest": "d2110265b49c4824709a7f3aa1b501be", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8429, "upload_time": "2019-10-15T14:34:52", "url": "https://files.pythonhosted.org/packages/e5/be/7681d01d5a52ba17254edb362386d0e4fcbd00aec2700ede31fc006bd366/pyforest-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "1dc75444889b1d9ddef6c4cd60aed812", "sha256": "ed7db5d2f15b08141b816c961cd82b44769b345fcb8d51f167c91542a0af86c6" }, "downloads": -1, "filename": "pyforest-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1dc75444889b1d9ddef6c4cd60aed812", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9443, "upload_time": "2019-10-20T19:42:24", "url": "https://files.pythonhosted.org/packages/07/b7/c78623e4b215b0476f96038cfe75920eda1a9a216fed1e6105a7d9de5e47/pyforest-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1dc75444889b1d9ddef6c4cd60aed812", "sha256": "ed7db5d2f15b08141b816c961cd82b44769b345fcb8d51f167c91542a0af86c6" }, "downloads": -1, "filename": "pyforest-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1dc75444889b1d9ddef6c4cd60aed812", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9443, "upload_time": "2019-10-20T19:42:24", "url": "https://files.pythonhosted.org/packages/07/b7/c78623e4b215b0476f96038cfe75920eda1a9a216fed1e6105a7d9de5e47/pyforest-0.1.4.tar.gz" } ] }