notrandom


Namenotrandom JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryPseudorandom, 100% reproducible variable generators
upload_time2023-12-25 10:03:17
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords random pseudorandom generators
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            notrandom: Pseudorandom, 100% reproducible variable generators.

Implementation of the builtin 'random' API, which guarantees 100% deterministic and reproducible computation of values, regardless of python versions, operating system or environment (a guarantee that the 'random' module does not provide). Non randomness guaranteed!

For example, when seeding the generator with the integer 0, the those are the first 3 floating numbers, across all systems, Python Implementations and versions. Try it yourself! ::

    >> from notrandom import random, seed
    >> seed(0)
    >> print(random(), random(), random())
    0.40003172633476936 0.16874476805609495 0.07212944838504431

This package is based on the builtin 'random' module and strongly resembles its API, with only minor adjustments. In particular, all global functions of random are also available in notrandom, in addition to the notrandom.Random object which implements the random.Random api. Check out the test.py file for usage examples.

It is important to note that the values computed by the notrandom are actually not random at all, as the process is 100% deterministic (that is the whole point!). Obviously, it is not intended to be used cryptographically in any way or circumstance.

Behind the scenes, notrandom uses the cryptographic hash function SHA256, in a process that resembles the OFB mode of operation. The algorithm produces blocks of 256bits ad-hoc, by hashing the previous 256bit block using SHA256, where the initial block is derived from the key directly. Then using similar technics to the ones that 'random' uses, random floating point numbers and integers in range are derived when requested.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "notrandom",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "random,pseudorandom,generators",
    "author": "",
    "author_email": "Alon Krymgand <os@alon.kr>",
    "download_url": "https://files.pythonhosted.org/packages/41/01/c836d5267fd5dce4324d40380e2ef53dd3e5a402eb40458ac48872bac5b6/notrandom-1.0.0.tar.gz",
    "platform": null,
    "description": "notrandom: Pseudorandom, 100% reproducible variable generators.\n\nImplementation of the builtin 'random' API, which guarantees 100% deterministic and reproducible computation of values, regardless of python versions, operating system or environment (a guarantee that the 'random' module does not provide). Non randomness guaranteed!\n\nFor example, when seeding the generator with the integer 0, the those are the first 3 floating numbers, across all systems, Python Implementations and versions. Try it yourself! ::\n\n    >> from notrandom import random, seed\n    >> seed(0)\n    >> print(random(), random(), random())\n    0.40003172633476936 0.16874476805609495 0.07212944838504431\n\nThis package is based on the builtin 'random' module and strongly resembles its API, with only minor adjustments. In particular, all global functions of random are also available in notrandom, in addition to the notrandom.Random object which implements the random.Random api. Check out the test.py file for usage examples.\n\nIt is important to note that the values computed by the notrandom are actually not random at all, as the process is 100% deterministic (that is the whole point!). Obviously, it is not intended to be used cryptographically in any way or circumstance.\n\nBehind the scenes, notrandom uses the cryptographic hash function SHA256, in a process that resembles the OFB mode of operation. The algorithm produces blocks of 256bits ad-hoc, by hashing the previous 256bit block using SHA256, where the initial block is derived from the key directly. Then using similar technics to the ones that 'random' uses, random floating point numbers and integers in range are derived when requested.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Pseudorandom, 100% reproducible variable generators",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [
        "random",
        "pseudorandom",
        "generators"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "89a362134c7290dcef7a889dd5834fb3e018b79036bf851bc83cad42a7b52010",
                "md5": "b6c873ef392a627b449be83b8357bc05",
                "sha256": "effaa4c994a5a9f94ea872375a1766a7bc286f2eb64e8866917f26bd1ec741c6"
            },
            "downloads": -1,
            "filename": "notrandom-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b6c873ef392a627b449be83b8357bc05",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4089,
            "upload_time": "2023-12-25T10:03:15",
            "upload_time_iso_8601": "2023-12-25T10:03:15.539873Z",
            "url": "https://files.pythonhosted.org/packages/89/a3/62134c7290dcef7a889dd5834fb3e018b79036bf851bc83cad42a7b52010/notrandom-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4101c836d5267fd5dce4324d40380e2ef53dd3e5a402eb40458ac48872bac5b6",
                "md5": "b2cb3531a8596a414725c3737562c851",
                "sha256": "8fc1073c2d17a8e5b7e1f54b55a614c09678ab54d9f0f64393b0525bef2c7f0c"
            },
            "downloads": -1,
            "filename": "notrandom-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b2cb3531a8596a414725c3737562c851",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3454,
            "upload_time": "2023-12-25T10:03:17",
            "upload_time_iso_8601": "2023-12-25T10:03:17.559861Z",
            "url": "https://files.pythonhosted.org/packages/41/01/c836d5267fd5dce4324d40380e2ef53dd3e5a402eb40458ac48872bac5b6/notrandom-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-25 10:03:17",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "notrandom"
}
        
Elapsed time: 0.15618s