############################# EASYDEV documentation ############################# .. raw:: html
:contributions: Please join https://github.com/cokelaer/easydev :source: Please use https://github.com/cokelaer/easydev :issues: Please use https://github.com/cokelaer/easydev/issues :Python version supported: 2.6, 2.7, 3.3, 3.4, 3.5 Motivation ########### The package `easydev `_ provides miscellaneous functions and files that are repeatidly used in other Python packages. Some functions are very simple such as the :func:`~easydev.tools.swapdict`, which inverts the keys/values in a dictionary (assuming unique keys): .. doctest:: >>> from easydev import swapdict >>> d = {'a':1, 'b':2} >>> inv = swapdict(d) >>> inv {1: 'a', 2: 'b'} The **swapdict** is just one functions amongst many others but belongs to the *simple* functions. Other functions such as the progress bar (:mod:`~easydev.progressbar`) are more complex and **easydev** should be very useful in speeding up development. Another example is the :func:`~easydev.tools.AttrDict` function: it makes the keys of a dictionary accessible as attributes. Meaning that you can get or set the values quickly as follows: .. doctest:: >>> from easydev import AttrDict >>> d = AttrDic(**{'a':1, 'b':2}) >>> d.a 1 >>> d.a = 10 >>> d.a 10 Another example is the :mod:`~easydev.multicore` module that provides a simple tool to perform a multi-core analysis in Python. Note, however, that specialised library would surely cover more aspects. Yet, in a few lines of code many applications would work out of the box with this code:: from easydev.multicore import MultiProcessing mp = MultiProcessing(maxcpu=4) mp.add_job(test_func, 2) mp.add_job(test_func, 1) mp.run() There are many such functions in **easydev** and the best would be to have a look at the :ref:`user_guide` for more examples and the :ref:`ref_guide` guide for an exhaustuve list of tools available. There are also a few applications installed with **easydev**. One is the **browse** application that is equivalent to **open** under Mac. The interest is that it is multi-platform. Note also that **easydev** was starting a few years ago and that some functionalities did not exists back then but do now in e.g. standard modules of Python. Installation ################### Of course, you will need to install `Python `_ (linux and mac users should have it installed already). We recommend also to install `ipython `_, which provides a more flexible shell alternative to the python shell itself. One specificity of **easydev** is be a pure Python package. However we depend on a few simple packages namely, colorama (for terminal colors under windwos), pexpect and profiler (optional). They are pure Python packages though and therefore the following command should install easydev out of the box using the `PyPi `_ command:: pip install easydev --upgrade Contributions ######################### For contributions or bug reports, please see `easydev on github `_. .. _user_guide: User guide ################## .. toctree:: :maxdepth: 2 :numbered: quickstart.rst .. _ref_guide: Reference Guide ################## .. toctree:: :maxdepth: 2 :numbered: references