You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
5.1 KiB

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