# 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
[...]
```
Raw data
{
"_id": null,
"home_page": "https://github.com/bbc2/shuffled",
"name": "shuffled",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "random,integer,iterator",
"author": "Bertrand Bonnefoy-Claudet",
"author_email": "bertrand@bertrandbc.com",
"download_url": "https://files.pythonhosted.org/packages/9c/3c/c221e96d00a1a5c9f3c10cfe3a9e3e8dc0fc19afae7b74e2d68a6cebf31e/shuffled-1.1.0.tar.gz",
"platform": null,
"description": "# Shuffled: Random iterators for large integer ranges\n\nShuffled is a library for iterating randomly and without repetition over integer ranges.\nIt doesn't store all the integers in memory so that you can work with ranges of up to\n2<sup>128</sup> elements, even with your standard RAM available.\n\n```python\n>>> shuffled_range = Shuffled(10)\n>>> list(shuffled_range)\n[4, 1, 2, 9, 8, 5, 3, 0, 6, 7]\n>>> same_shuffled_range = Shuffled(10, seed=shuffled_range.seed)\n>>> list(same_shuffled_range)\n[4, 1, 2, 9, 8, 5, 3, 0, 6, 7]\n```\n\n```python\n>>> network = ipaddress.IPv4Network('10.0.0.0/8')\n>>> shuffled_range = Shuffled(network.num_addresses)\n>>> for index in shuffled_range:\n... print(network[index])\n...\n10.24.41.126\n10.67.199.15\n10.240.82.199\n10.79.219.74\n10.166.105.25\n10.19.5.91\n[...]\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Iterate randomly over integer ranges",
"version": "1.1.0",
"split_keywords": [
"random",
"integer",
"iterator"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "25c8f225248b23f6d940355b5e2e22ef",
"sha256": "5d64d653b960fb8a0581e4353414ae566bad82f815608460d440e0ab7dcd31f4"
},
"downloads": -1,
"filename": "shuffled-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "25c8f225248b23f6d940355b5e2e22ef",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 5077,
"upload_time": "2022-12-29T14:22:47",
"upload_time_iso_8601": "2022-12-29T14:22:47.273794Z",
"url": "https://files.pythonhosted.org/packages/e6/f8/f11ec759e9f1b7d22f8f5443387401423c43b2802c36b18c707014b9f1fb/shuffled-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "77747a780a2016dbda84c656840e8a8b",
"sha256": "0997faab07b16641e50b8ea34505775573eedcda6ff7706992965032e83f4ac0"
},
"downloads": -1,
"filename": "shuffled-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "77747a780a2016dbda84c656840e8a8b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 4241,
"upload_time": "2022-12-29T14:22:48",
"upload_time_iso_8601": "2022-12-29T14:22:48.336406Z",
"url": "https://files.pythonhosted.org/packages/9c/3c/c221e96d00a1a5c9f3c10cfe3a9e3e8dc0fc19afae7b74e2d68a6cebf31e/shuffled-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-29 14:22:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "bbc2",
"github_project": "shuffled",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "shuffled"
}