Metadata-Version: 2.1
Name: shuffled
Version: 1.0.1
Summary: Iterate randomly over integer ranges
Home-page: https://github.com/bbc2/shuffled
License: MIT
Keywords: random,integer,iterator
Author: Bertrand Bonnefoy-Claudet
Author-email: bertrand@bertrandbc.com
Requires-Python: >=3.5,<4.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Typing :: Typed
Provides-Extra: dev
Provides-Extra: tests
Requires-Dist: black; (python_version >= "3.8" and python_version < "4.0") and (extra == "dev")
Requires-Dist: cryptography
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pytest-cov; extra == "tests"
Requires-Dist: pytest; extra == "tests"
Description-Content-Type: text/markdown

# Shuffled: Random iterators for large integer ranges

Shuffled is a library for iterating randomly and without repetition over integer ranges.
It doesn't store all the integers in memory so that you can work with ranges of up to
2<sup>128</sup> elements, even with your standard RAM available.

```python
>>> shuffled_range = Shuffled(10)
>>> list(shuffled_range)
[4, 1, 2, 9, 8, 5, 3, 0, 6, 7]
>>> same_shuffled_range = Shuffled(10, seed=shuffled_range.seed)
>>> list(same_shuffled_range)
[4, 1, 2, 9, 8, 5, 3, 0, 6, 7]
```

```python
>>> network = ipaddress.IPv4Network('10.0.0.0/8')
>>> shuffled_range = Shuffled(network.num_addresses)
>>> for index in shuffled_range:
...     print(network[index])
...
10.24.41.126
10.67.199.15
10.240.82.199
10.79.219.74
10.166.105.25
10.19.5.91
[...]
```

