|
| 1 | +# pyforest - lazy-import of all popular Python Data Science libraries. Stop writing the same imports over and over again. |
| 2 | + |
| 3 | +pyforest 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. |
| 4 | + |
| 5 | +- [Demo in Jupyter Notebook](#demo-in-jupyter-notebook) |
| 6 | +- [Demo in Python Shell](#demo-in-python-shell) |
| 7 | +- [Using pyforest](#using-pyforest) |
| 8 | +- [Installation](#installation) |
| 9 | +- [FAQs](#faqs) |
| 10 | +- [Contributing](#contributing) |
| 11 | +- [About](#about) |
| 12 | +- [Join our community and grow further](#join-our-community-and-grow-further) |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | +## Demo in Jupyter Notebook |
| 17 | +<!--  --> |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +## Demo in Python Shell |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +## Using pyforest |
| 26 | +pyforest lazy-imports all popular Python Data Science libraries with a single line of code: |
| 27 | + |
| 28 | +`from pyforest import *` |
| 29 | + |
| 30 | +And if you use Jupyter or IPython, you can even skip this line because pyforest adds itself to the autostart. |
| 31 | + |
| 32 | +When you are done with your script, you can export all import statements via: |
| 33 | +`active_imports()` |
| 34 | + |
| 35 | + |
| 36 | +Which libraries are available? |
| 37 | +- We aim to add all popular Python Data Science libraries which should account for >99% of your daily imports. For example, `pd from pandas, np from numpy, sns from seaborn, plt from matplotlib.pyplot, or OneHotEncoder from sklearn` and many more. In addition, there are also helper modules like `os, re, tqdm, or Path from pathlib`. |
| 38 | +- You can check all imports and add new ones in the [pyforest imports](src/pyforest/imports.py). |
| 39 | + |
| 40 | +> 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. |
| 41 | +
|
| 42 | + |
| 43 | +## Installation |
| 44 | +From the terminal, enter: |
| 45 | + |
| 46 | +`pip install pyforest` |
| 47 | + |
| 48 | +And you're ready to go. |
| 49 | + |
| 50 | +Please note, that this will also add pyforest to your IPython default startup settings. |
| 51 | + |
| 52 | + |
| 53 | +## Frequently Asked Questions |
| 54 | + |
| 55 | +- "I need to always explicitly write down the libraries I used at the top of my scripts." Of course, you can export the import statements for all used libraries with `active_imports()`. |
| 56 | + |
| 57 | +- "Doesn't this slow down my Jupyter or Python startup process?" 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. |
| 58 | + |
| 59 | +- "Why can't I just use the typical IPython import?" If you were to add all the libraries that pyforest includes, your startup time might take more than 30s. |
| 60 | + |
| 61 | +- "I don't have and don't need tensorflow. What will happen when I use pyforest?" 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). |
| 62 | + |
| 63 | +- "Will the pyforest variables interfere with my own local variables?" 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). |
| 64 | + |
| 65 | +- "What about auto-completion on lazily imported modules?" It works :) As soon as you start the auto-completion, pyforest will import the module and return the available symbols to your auto-completer. |
| 66 | + |
| 67 | + |
| 68 | +## Contributing |
| 69 | +In 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) |
| 70 | + |
| 71 | + |
| 72 | +## About |
| 73 | +pyforest is developed by Florian, Tobias and Guido from 8080 Labs. Our goal is to improve the productivity of Python Data Scientists. Other projects that we are working on are [edaviz.com](https://edaviz.com) and [bamboolib.com](https://bamboolib.com) |
| 74 | + |
| 75 | + |
| 76 | +## Join our community and grow further |
| 77 | +If you |
| 78 | +- like our work or |
| 79 | +- want to become a faster Python Data Scientist or |
| 80 | +- want to discuss the future of the Python Data Science ecosystem or |
| 81 | +- are just interested in mingling with like-minded fellows |
| 82 | + |
| 83 | +then, you are invited to [join our slack](https://join.slack.com/t/fasterpyds/shared_invite/enQtNzExNDMxNzQ3NTU0LTNhMjI3MTM5ZGZlN2Y4NWIwOWUxZDg4ODE1MzkyNTc1NDhmNjg5ZGZhYmI1ZjBkNzgzMTI3MDcxNWMzZDA0NGQ). |
| 84 | + |
0 commit comments