Metadata-Version: 2.2
Name: indexable_generator
Version: 1.0.1
Summary: Implement Sequence functionalities to python Generators.
Author: Tiago Simoes Beijoco
Author-email: Tiago Simoes Beijoco <craft.uas@gmail.com>
Project-URL: Homepage, https://github.com/TiagoCraft/indexable_generator.git
Project-URL: Issues, https://github.com/TiagoCraft/indexable_generator/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: importlib-metadata; python_version < "3.10"
Dynamic: author

# IndexableGenerator

Implement Sequence functionalities to python Generators.

These include getitem, index and length. Values are cached as they are consumed
from the generator.

## Examples:

    @IndexableGenerator.cast
    def gen():
        for x in range(10):
            yield x

    ig = gen()
    ig[3:6]  # (3, 4, 5)

    ig = IndexableGenerator((x for x in range(10)))
    ig[3:6]  # (3, 4, 5)
