METADATA 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. Metadata-Version: 2.0
  2. Name: toolz
  3. Version: 0.9.0
  4. Summary: List processing tools and functional utilities
  5. Home-page: http://github.com/pytoolz/toolz/
  6. Author: Matthew Rocklin
  7. Author-email: mrocklin@gmail.com
  8. License: BSD
  9. Keywords: functional utility itertools functools
  10. Platform: UNKNOWN
  11. Classifier: Development Status :: 5 - Production/Stable
  12. Classifier: License :: OSI Approved :: BSD License
  13. Classifier: Programming Language :: Python
  14. Classifier: Programming Language :: Python :: 2.6
  15. Classifier: Programming Language :: Python :: 2.7
  16. Classifier: Programming Language :: Python :: 3
  17. Classifier: Programming Language :: Python :: 3.3
  18. Classifier: Programming Language :: Python :: 3.4
  19. Classifier: Programming Language :: Python :: 3.5
  20. Classifier: Programming Language :: Python :: 3.6
  21. Classifier: Programming Language :: Python :: Implementation :: CPython
  22. Classifier: Programming Language :: Python :: Implementation :: PyPy
  23. Toolz
  24. =====
  25. |Build Status| |Coverage Status| |Version Status| |Downloads|
  26. A set of utility functions for iterators, functions, and dictionaries.
  27. See the PyToolz documentation at https://toolz.readthedocs.io
  28. LICENSE
  29. -------
  30. New BSD. See `License File <https://github.com/pytoolz/toolz/blob/master/LICENSE.txt>`__.
  31. Install
  32. -------
  33. ``toolz`` is on the Python Package Index (PyPI):
  34. ::
  35. pip install toolz
  36. Structure and Heritage
  37. ----------------------
  38. ``toolz`` is implemented in three parts:
  39. |literal itertoolz|_, for operations on iterables. Examples: ``groupby``,
  40. ``unique``, ``interpose``,
  41. |literal functoolz|_, for higher-order functions. Examples: ``memoize``,
  42. ``curry``, ``compose``
  43. |literal dicttoolz|_, for operations on dictionaries. Examples: ``assoc``,
  44. ``update-in``, ``merge``.
  45. .. |literal itertoolz| replace:: ``itertoolz``
  46. .. _literal itertoolz: https://github.com/pytoolz/toolz/blob/master/toolz/itertoolz.py
  47. .. |literal functoolz| replace:: ``functoolz``
  48. .. _literal functoolz: https://github.com/pytoolz/toolz/blob/master/toolz/functoolz.py
  49. .. |literal dicttoolz| replace:: ``dicttoolz``
  50. .. _literal dicttoolz: https://github.com/pytoolz/toolz/blob/master/toolz/dicttoolz.py
  51. These functions come from the legacy of functional languages for list
  52. processing. They interoperate well to accomplish common complex tasks.
  53. Read our `API
  54. Documentation <https://toolz.readthedocs.io/en/latest/api.html>`__ for
  55. more details.
  56. Example
  57. -------
  58. This builds a standard wordcount function from pieces within ``toolz``:
  59. .. code:: python
  60. >>> def stem(word):
  61. ... """ Stem word to primitive form """
  62. ... return word.lower().rstrip(",.!:;'-\"").lstrip("'\"")
  63. >>> from toolz import compose, frequencies, partial
  64. >>> from toolz.curried import map
  65. >>> wordcount = compose(frequencies, map(stem), str.split)
  66. >>> sentence = "This cat jumped over this other cat!"
  67. >>> wordcount(sentence)
  68. {'this': 2, 'cat': 2, 'jumped': 1, 'over': 1, 'other': 1}
  69. Dependencies
  70. ------------
  71. ``toolz`` supports Python 2.6+ and Python 3.3+ with a common codebase.
  72. It is pure Python and requires no dependencies beyond the standard
  73. library.
  74. It is, in short, a light weight dependency.
  75. CyToolz
  76. -------
  77. The ``toolz`` project has been reimplemented in `Cython <http://cython.org>`__.
  78. The ``cytoolz`` project is a drop-in replacement for the Pure Python
  79. implementation.
  80. See `CyToolz Github Page <https://github.com/pytoolz/cytoolz/>`__ for more
  81. details.
  82. See Also
  83. --------
  84. - `Underscore.js <http://underscorejs.org>`__: A similar library for
  85. JavaScript
  86. - `Enumerable <http://ruby-doc.org/core-2.0.0/Enumerable.html>`__: A
  87. similar library for Ruby
  88. - `Clojure <http://clojure.org>`__: A functional language whose
  89. standard library has several counterparts in ``toolz``
  90. - `itertools <http://docs.python.org/2/library/itertools.html>`__: The
  91. Python standard library for iterator tools
  92. - `functools <http://docs.python.org/2/library/functools.html>`__: The
  93. Python standard library for function tools
  94. Contributions Welcome
  95. ---------------------
  96. ``toolz`` aims to be a repository for utility functions, particularly
  97. those that come from the functional programming and list processing
  98. traditions. We welcome contributions that fall within this scope.
  99. We also try to keep the API small to keep ``toolz`` manageable. The ideal
  100. contribution is significantly different from existing functions and has
  101. precedent in a few other functional systems.
  102. Please take a look at our
  103. `issue page <https://github.com/pytoolz/toolz/issues>`__
  104. for contribution ideas.
  105. Community
  106. ---------
  107. See our `mailing list <https://groups.google.com/forum/#!forum/pytoolz>`__.
  108. We're friendly.
  109. .. |Build Status| image:: https://travis-ci.org/pytoolz/toolz.svg?branch=master
  110. :target: https://travis-ci.org/pytoolz/toolz
  111. .. |Coverage Status| image:: https://coveralls.io/repos/pytoolz/toolz/badge.svg?branch=master
  112. :target: https://coveralls.io/r/pytoolz/toolz
  113. .. |Version Status| image:: https://badge.fury.io/py/toolz.svg
  114. :target: http://badge.fury.io/py/toolz
  115. .. |Downloads| image:: https://img.shields.io/pypi/dm/toolz.svg
  116. :target: https://pypi.python.org/pypi/toolz/