iters


Nameiters JSON
Version 0.18.0 PyPI version JSON
download
home_pagehttps://github.com/nekitdev/iters
SummaryComposable external iteration.
upload_time2024-04-23 18:50:10
maintainerNone
docs_urlNone
authornekitdev
requires_python>=3.8
licenseMIT
keywords python iter iterator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # `iters`

[![License][License Badge]][License]
[![Version][Version Badge]][Package]
[![Downloads][Downloads Badge]][Package]
[![Discord][Discord Badge]][Discord]

[![Documentation][Documentation Badge]][Documentation]
[![Check][Check Badge]][Actions]
[![Test][Test Badge]][Actions]
[![Coverage][Coverage Badge]][Coverage]

> *Composable external iteration.*

If you have found yourself with a *collection* of some kind, and needed to perform
an operation on the elements of said collection, you will quickly run into *iterators*.
Iterators are heavily used in idiomatic Python code, so becoming familiar with them is essential.

## Installing

**Python 3.8 or above is required.**

### pip

Installing the library with `pip` is quite simple:

```console
$ pip install iters
```

Alternatively, the library can be installed from source:

```console
$ git clone https://github.com/nekitdev/iters.git
$ cd iters
$ python -m pip install .
```

### poetry

You can add `iters` as a dependency with the following command:

```console
$ poetry add iters
```

Or by directly specifying it in the configuration like so:

```toml
[tool.poetry.dependencies]
iters = "^0.18.0"
```

Alternatively, you can add it directly from the source:

```toml
[tool.poetry.dependencies.iters]
git = "https://github.com/nekitdev/iters.git"
```

## Examples

### Simple

Squaring only even numbers in some sequence:

```python
from iters import iter


def is_even(value: int) -> bool:
    return not value % 2


def square(value: int) -> int:
    return value * value


numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

result = iter(numbers).filter(is_even).map(square).list()

print(result)  # [0, 4, 16, 36, 64]
```

### Asynchronous

Asynchronous iteration is fully supported by `iters`, and its API is similar to its
synchronous counterpart.

## Documentation

You can find the documentation [here][Documentation].

## Support

If you need support with the library, you can send an [email][Email]
or refer to the official [Discord server][Discord].

## Changelog

You can find the changelog [here][Changelog].

## Security Policy

You can find the Security Policy of `iters` [here][Security].

## Contributing

If you are interested in contributing to `iters`, make sure to take a look at the
[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct].

## License

`iters` is licensed under the MIT License terms. See [License][License] for details.

[Email]: mailto:support@nekit.dev

[Discord]: https://nekit.dev/discord

[Actions]: https://github.com/nekitdev/iters/actions

[Changelog]: https://github.com/nekitdev/iters/blob/main/CHANGELOG.md
[Code of Conduct]: https://github.com/nekitdev/iters/blob/main/CODE_OF_CONDUCT.md
[Contributing Guide]: https://github.com/nekitdev/iters/blob/main/CONTRIBUTING.md
[Security]: https://github.com/nekitdev/iters/blob/main/SECURITY.md

[License]: https://github.com/nekitdev/iters/blob/main/LICENSE

[Package]: https://pypi.org/project/iters
[Coverage]: https://codecov.io/gh/nekitdev/iters
[Documentation]: https://nekitdev.github.io/iters

[Discord Badge]: https://img.shields.io/badge/chat-discord-5865f2
[License Badge]: https://img.shields.io/pypi/l/iters
[Version Badge]: https://img.shields.io/pypi/v/iters
[Downloads Badge]: https://img.shields.io/pypi/dm/iters

[Documentation Badge]: https://github.com/nekitdev/iters/workflows/docs/badge.svg
[Check Badge]: https://github.com/nekitdev/iters/workflows/check/badge.svg
[Test Badge]: https://github.com/nekitdev/iters/workflows/test/badge.svg
[Coverage Badge]: https://codecov.io/gh/nekitdev/iters/branch/main/graph/badge.svg

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nekitdev/iters",
    "name": "iters",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "python, iter, iterator",
    "author": "nekitdev",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/6b/06/45ff764cfcd3ab7e9f60127cca16f931204d54d4925bf6592bd5dd2dde89/iters-0.18.0.tar.gz",
    "platform": null,
    "description": "# `iters`\n\n[![License][License Badge]][License]\n[![Version][Version Badge]][Package]\n[![Downloads][Downloads Badge]][Package]\n[![Discord][Discord Badge]][Discord]\n\n[![Documentation][Documentation Badge]][Documentation]\n[![Check][Check Badge]][Actions]\n[![Test][Test Badge]][Actions]\n[![Coverage][Coverage Badge]][Coverage]\n\n> *Composable external iteration.*\n\nIf you have found yourself with a *collection* of some kind, and needed to perform\nan operation on the elements of said collection, you will quickly run into *iterators*.\nIterators are heavily used in idiomatic Python code, so becoming familiar with them is essential.\n\n## Installing\n\n**Python 3.8 or above is required.**\n\n### pip\n\nInstalling the library with `pip` is quite simple:\n\n```console\n$ pip install iters\n```\n\nAlternatively, the library can be installed from source:\n\n```console\n$ git clone https://github.com/nekitdev/iters.git\n$ cd iters\n$ python -m pip install .\n```\n\n### poetry\n\nYou can add `iters` as a dependency with the following command:\n\n```console\n$ poetry add iters\n```\n\nOr by directly specifying it in the configuration like so:\n\n```toml\n[tool.poetry.dependencies]\niters = \"^0.18.0\"\n```\n\nAlternatively, you can add it directly from the source:\n\n```toml\n[tool.poetry.dependencies.iters]\ngit = \"https://github.com/nekitdev/iters.git\"\n```\n\n## Examples\n\n### Simple\n\nSquaring only even numbers in some sequence:\n\n```python\nfrom iters import iter\n\n\ndef is_even(value: int) -> bool:\n    return not value % 2\n\n\ndef square(value: int) -> int:\n    return value * value\n\n\nnumbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\nresult = iter(numbers).filter(is_even).map(square).list()\n\nprint(result)  # [0, 4, 16, 36, 64]\n```\n\n### Asynchronous\n\nAsynchronous iteration is fully supported by `iters`, and its API is similar to its\nsynchronous counterpart.\n\n## Documentation\n\nYou can find the documentation [here][Documentation].\n\n## Support\n\nIf you need support with the library, you can send an [email][Email]\nor refer to the official [Discord server][Discord].\n\n## Changelog\n\nYou can find the changelog [here][Changelog].\n\n## Security Policy\n\nYou can find the Security Policy of `iters` [here][Security].\n\n## Contributing\n\nIf you are interested in contributing to `iters`, make sure to take a look at the\n[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct].\n\n## License\n\n`iters` is licensed under the MIT License terms. See [License][License] for details.\n\n[Email]: mailto:support@nekit.dev\n\n[Discord]: https://nekit.dev/discord\n\n[Actions]: https://github.com/nekitdev/iters/actions\n\n[Changelog]: https://github.com/nekitdev/iters/blob/main/CHANGELOG.md\n[Code of Conduct]: https://github.com/nekitdev/iters/blob/main/CODE_OF_CONDUCT.md\n[Contributing Guide]: https://github.com/nekitdev/iters/blob/main/CONTRIBUTING.md\n[Security]: https://github.com/nekitdev/iters/blob/main/SECURITY.md\n\n[License]: https://github.com/nekitdev/iters/blob/main/LICENSE\n\n[Package]: https://pypi.org/project/iters\n[Coverage]: https://codecov.io/gh/nekitdev/iters\n[Documentation]: https://nekitdev.github.io/iters\n\n[Discord Badge]: https://img.shields.io/badge/chat-discord-5865f2\n[License Badge]: https://img.shields.io/pypi/l/iters\n[Version Badge]: https://img.shields.io/pypi/v/iters\n[Downloads Badge]: https://img.shields.io/pypi/dm/iters\n\n[Documentation Badge]: https://github.com/nekitdev/iters/workflows/docs/badge.svg\n[Check Badge]: https://github.com/nekitdev/iters/workflows/check/badge.svg\n[Test Badge]: https://github.com/nekitdev/iters/workflows/test/badge.svg\n[Coverage Badge]: https://codecov.io/gh/nekitdev/iters/branch/main/graph/badge.svg\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Composable external iteration.",
    "version": "0.18.0",
    "project_urls": {
        "Chat": "https://nekit.dev/chat",
        "Documentation": "https://nekitdev.github.io/iters",
        "Homepage": "https://github.com/nekitdev/iters",
        "Issues": "https://github.com/nekitdev/iters/issues",
        "Repository": "https://github.com/nekitdev/iters"
    },
    "split_keywords": [
        "python",
        " iter",
        " iterator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "215fd11beae693356c6c4bbe11eb45ff5c5b380e906f338116ddd46a1708560a",
                "md5": "85046c29df7bd878364b1cb5b2e96238",
                "sha256": "932eec3100eed3768699401983c3ca254bde1b0cf09aa9e452d5f063719d8654"
            },
            "downloads": -1,
            "filename": "iters-0.18.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "85046c29df7bd878364b1cb5b2e96238",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 57792,
            "upload_time": "2024-04-23T18:50:08",
            "upload_time_iso_8601": "2024-04-23T18:50:08.401288Z",
            "url": "https://files.pythonhosted.org/packages/21/5f/d11beae693356c6c4bbe11eb45ff5c5b380e906f338116ddd46a1708560a/iters-0.18.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b0645ff764cfcd3ab7e9f60127cca16f931204d54d4925bf6592bd5dd2dde89",
                "md5": "cfb8274b187fe000f6019f639955aa24",
                "sha256": "a4675193c8c0d60d7cca7e97c0eea588d37b586df268346070e0550d978fdb55"
            },
            "downloads": -1,
            "filename": "iters-0.18.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cfb8274b187fe000f6019f639955aa24",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 54845,
            "upload_time": "2024-04-23T18:50:10",
            "upload_time_iso_8601": "2024-04-23T18:50:10.063526Z",
            "url": "https://files.pythonhosted.org/packages/6b/06/45ff764cfcd3ab7e9f60127cca16f931204d54d4925bf6592bd5dd2dde89/iters-0.18.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-23 18:50:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nekitdev",
    "github_project": "iters",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "iters"
}
        
Elapsed time: 0.22365s