{"id":13398785,"url":"https://github.com/pytoolz/toolz","last_synced_at":"2025-05-13T11:06:42.046Z","repository":{"id":38240267,"uuid":"12799539","full_name":"pytoolz/toolz","owner":"pytoolz","description":"A functional standard library for Python.","archived":false,"fork":false,"pushed_at":"2025-01-08T17:51:19.000Z","size":1146,"stargazers_count":4855,"open_issues_count":126,"forks_count":266,"subscribers_count":78,"default_branch":"master","last_synced_at":"2025-05-13T11:06:35.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://toolz.readthedocs.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pytoolz.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-09-13T02:18:43.000Z","updated_at":"2025-05-12T14:17:23.000Z","dependencies_parsed_at":"2023-02-09T09:46:50.549Z","dependency_job_id":"a4574bcf-df23-4951-a6b3-f26e695ccf93","html_url":"https://github.com/pytoolz/toolz","commit_stats":{"total_commits":934,"total_committers":80,"mean_commits":11.675,"dds":0.6113490364025695,"last_synced_commit":"6cb5e6d5005016ad503507bbb7a58dd7396c6c4b"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytoolz%2Ftoolz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytoolz%2Ftoolz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytoolz%2Ftoolz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytoolz%2Ftoolz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pytoolz","download_url":"https://codeload.github.com/pytoolz/toolz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253929364,"owners_count":21985802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:00:31.658Z","updated_at":"2025-05-13T11:06:42.006Z","avatar_url":"https://github.com/pytoolz.png","language":"Python","readme":"Toolz\n=====\n\n|Build Status| |Coverage Status| |Version Status|\n\nA set of utility functions for iterators, functions, and dictionaries.\n\nSee the PyToolz documentation at https://toolz.readthedocs.io\n\nLICENSE\n-------\n\nNew BSD. See `License File \u003chttps://github.com/pytoolz/toolz/blob/master/LICENSE.txt\u003e`__.\n\nInstall\n-------\n\n``toolz`` is on the Python Package Index (PyPI):\n\n::\n\n    pip install toolz\n\nStructure and Heritage\n----------------------\n\n``toolz`` is implemented in three parts:\n\n|literal itertoolz|_, for operations on iterables. Examples: ``groupby``,\n``unique``, ``interpose``,\n\n|literal functoolz|_, for higher-order functions. Examples: ``memoize``,\n``curry``, ``compose``,\n\n|literal dicttoolz|_, for operations on dictionaries. Examples: ``assoc``,\n``update-in``, ``merge``.\n\n.. |literal itertoolz| replace:: ``itertoolz``\n.. _literal itertoolz: https://github.com/pytoolz/toolz/blob/master/toolz/itertoolz.py\n\n.. |literal functoolz| replace:: ``functoolz``\n.. _literal functoolz: https://github.com/pytoolz/toolz/blob/master/toolz/functoolz.py\n\n.. |literal dicttoolz| replace:: ``dicttoolz``\n.. _literal dicttoolz: https://github.com/pytoolz/toolz/blob/master/toolz/dicttoolz.py\n\nThese functions come from the legacy of functional languages for list\nprocessing. They interoperate well to accomplish common complex tasks.\n\nRead our `API\nDocumentation \u003chttps://toolz.readthedocs.io/en/latest/api.html\u003e`__ for\nmore details.\n\nExample\n-------\n\nThis builds a standard wordcount function from pieces within ``toolz``:\n\n.. code:: python\n\n    \u003e\u003e\u003e def stem(word):\n    ...     \"\"\" Stem word to primitive form \"\"\"\n    ...     return word.lower().rstrip(\",.!:;'-\\\"\").lstrip(\"'\\\"\")\n\n    \u003e\u003e\u003e from toolz import compose, frequencies\n    \u003e\u003e\u003e from toolz.curried import map\n    \u003e\u003e\u003e wordcount = compose(frequencies, map(stem), str.split)\n\n    \u003e\u003e\u003e sentence = \"This cat jumped over this other cat!\"\n    \u003e\u003e\u003e wordcount(sentence)\n    {'this': 2, 'cat': 2, 'jumped': 1, 'over': 1, 'other': 1}\n\nDependencies\n------------\n\n``toolz`` supports Python 3.8+ with a common codebase.\nIt is pure Python and requires no dependencies beyond the standard\nlibrary.\n\nIt is, in short, a lightweight dependency.\n\n\nCyToolz\n-------\n\nThe ``toolz`` project has been reimplemented in `Cython \u003chttp://cython.org\u003e`__.\nThe ``cytoolz`` project is a drop-in replacement for the Pure Python\nimplementation.\nSee `CyToolz GitHub Page \u003chttps://github.com/pytoolz/cytoolz/\u003e`__ for more\ndetails.\n\nSee Also\n--------\n\n-  `Underscore.js \u003chttps://underscorejs.org/\u003e`__: A similar library for\n   JavaScript\n-  `Enumerable \u003chttps://ruby-doc.org/core-2.0.0/Enumerable.html\u003e`__: A\n   similar library for Ruby\n-  `Clojure \u003chttps://clojure.org/\u003e`__: A functional language whose\n   standard library has several counterparts in ``toolz``\n-  `itertools \u003chttps://docs.python.org/2/library/itertools.html\u003e`__: The\n   Python standard library for iterator tools\n-  `functools \u003chttps://docs.python.org/2/library/functools.html\u003e`__: The\n   Python standard library for function tools\n\nProject Status\n--------------\n\n**This project is alive but inactive.**\n\nThe original maintainers have mostly moved on to other endeavors.  We're still\naround for critical bug fixes, Python version bumps, and security issues and\nwill commit to keeping the project alive (it's highly depended upon).\nHowever, beyond that we don't plan to spend much time reviewing contributions.\nWe view Toolz as mostly complete.\n\nWe encourage enthusiasts to innovate in new and wonderful places 🚀\n\n.. |Build Status| image:: https://github.com/pytoolz/toolz/actions/workflows/test.yml/badge.svg?branch=master\n   :target: https://github.com/pytoolz/toolz/actions\n.. |Coverage Status| image:: https://codecov.io/gh/pytoolz/toolz/graph/badge.svg?token=4ZFc9dwKqY\n   :target: https://codecov.io/gh/pytoolz/toolz\n.. |Version Status| image:: https://badge.fury.io/py/toolz.svg\n   :target: https://badge.fury.io/py/toolz\n","funding_links":[],"categories":["Functional Programming","Python","资源列表","3rd-party Python","Containers \u0026 Language Extentions \u0026 Linting","函数式编程","General Utilities","Libraries","Functional Programming [🔝](#readme)","Awesome Python","Awesome Functional Python"],"sub_categories":["函数式编程","For Python","[Python](https://www.python.org/)","Functional Programming","Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytoolz%2Ftoolz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpytoolz%2Ftoolz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytoolz%2Ftoolz/lists"}