{"id":16654446,"url":"https://github.com/ikegami-yukino/flati","last_synced_at":"2025-03-21T16:31:43.220Z","repository":{"id":57431003,"uuid":"167778740","full_name":"ikegami-yukino/flati","owner":"ikegami-yukino","description":"Flatten nested iterable object for Python (Pure-Python implementation)","archived":false,"fork":false,"pushed_at":"2020-01-01T13:38:24.000Z","size":18,"stargazers_count":28,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-13T09:49:51.507Z","etag":null,"topics":["flatten","pure-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikegami-yukino.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"ikegami-yukino","custom":["https://www.paypal.me/yukinoi","https://www.amazon.co.jp/hz/wishlist/ls/15HRUQ0OYGJYQ?type=wishlist\u0026filter=unpurchased\u0026sort=priority"]}},"created_at":"2019-01-27T06:34:55.000Z","updated_at":"2021-10-21T10:52:46.000Z","dependencies_parsed_at":"2022-08-28T23:02:04.445Z","dependency_job_id":null,"html_url":"https://github.com/ikegami-yukino/flati","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikegami-yukino%2Fflati","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikegami-yukino%2Fflati/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikegami-yukino%2Fflati/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikegami-yukino%2Fflati/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikegami-yukino","download_url":"https://codeload.github.com/ikegami-yukino/flati/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221817029,"owners_count":16885449,"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":["flatten","pure-python"],"created_at":"2024-10-12T09:49:48.089Z","updated_at":"2024-10-28T10:29:08.583Z","avatar_url":"https://github.com/ikegami-yukino.png","language":"Python","funding_links":["https://github.com/sponsors/ikegami-yukino","https://www.paypal.me/yukinoi","https://www.amazon.co.jp/hz/wishlist/ls/15HRUQ0OYGJYQ?type=wishlist\u0026filter=unpurchased\u0026sort=priority"],"categories":[],"sub_categories":[],"readme":"flati\n==========\n|travis| |coveralls| |pyversion| |version| |license|\n\nFlatten nested iterable object (Pure-Python implementation)\n\nJapanese document is available: https://qiita.com/yukinoi/items/9570c76034c28bdae0a8\n\nInstallation\n==============\n\n::\n\n $ pip install flati\n\n\nUsage\n============\n\n.. code:: python\n\n  import flati\n\n  iterable = [(1, 2, 3), (4, (5, 6))]\n  list(flati.flatten(iterable))\n  # =\u003e [1, 2, 3, 4, 5, 6]\n\n  # flati.flatten() returns a generator\n  import types\n  isinstance(flati.flatten(iterable), types.GeneratorType)\n  # =\u003e True\n\n  # If you want to avoid flattening specific type, then use \"ignore\" parameter\n  iterable = [('abc'), ('def', ('g', 'hi'))]\n  list(flati.flatten(iterable, ignore=str))\n  # =\u003e ['abc', 'def', 'g', 'hi']\n\nTips\n------\nIf you want to flatten numpy.ndarray, I recommend using following methods:\n\n* numpy.ravel()\n* ndarray.reshape(-1)\n* ndarray.flatten()  # This method is a bit slow because it makes a copy\n\nContribution\n=============\nContributions are welcome.\n\nSee https://github.com/ikegami-yukino/flati/blob/master/CONTRIBUTING.md\n\n\n.. |travis| image:: https://travis-ci.org/ikegami-yukino/flati.svg?branch=master\n    :target: https://travis-ci.org/ikegami-yukino/flati\n    :alt: travis-ci.org\n\n.. |coveralls| image:: https://coveralls.io/repos/ikegami-yukino/flati/badge.svg?branch=master\u0026service=github\n    :target: https://coveralls.io/github/ikegami-yukino/flati?branch=master\n    :alt: coveralls.io\n\n.. |pyversion| image:: https://img.shields.io/pypi/pyversions/flati.svg\n\n.. |version| image:: https://img.shields.io/pypi/v/flati.svg\n    :target: http://pypi.python.org/pypi/flati/\n    :alt: latest version\n\n.. |license| image:: https://img.shields.io/pypi/l/flati.svg\n    :target: http://pypi.python.org/pypi/flati/\n    :alt: license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikegami-yukino%2Fflati","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikegami-yukino%2Fflati","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikegami-yukino%2Fflati/lists"}