py-random-dot-org


Namepy-random-dot-org JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryRandom.org Api Wrapped in Python
upload_time2024-09-12 22:28:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseCopyright (c) 2012-2024 Scott Chacon and others Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords random api wrapper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Random.org API Wrapper
======================

This Python module provides a wrapper for the `Random.org API`_ to generate various types of random data such as integers,
sequences, decimal fractions, Gaussian numbers, strings, UUIDs, and random blobs.

Features
--------

- Generate random integers, integer sequences, decimal fractions, and Gaussian-distributed numbers.
- Generate random strings, UUIDs, and blobs.
- Retrieve API usage statistics, including remaining bits and requests.

Installation
------------



Usage
-----

1. Import the ``BasicApi`` class and initialize it with your Random.org API key:
   ::

       from basic_api import BasicApi

       api = BasicApi(api_key="your_api_key")

2. Call the available methods to generate random data. For example, to generate random integers:
   ::

       random_integers = api.generate_integers(num=5, minimum=1, maximum=100)
       print(random_integers)

3. You can also check your API usage:
   ::

       usage_stats = api.get_usage()
       print(usage_stats)

Running Tests
-------------

The project includes tests written using ``pytest``. To run the tests:

1. Install ``pytest``:
   ::

       pip install pytest

2. Run the tests:
   ::

       pytest

License
-------

This project is licensed under the MIT License. See the LICENSE file for details.

.. _Random.org API: https://api.random.org/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "py-random-dot-org",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "random, api, wrapper",
    "author": null,
    "author_email": "Nick Seinsche <nick.seinsche@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ab/52/03911dd01e2eccc54e54a381d07a5012c6d2549b8068c9a24b9ffe51b0f9/py_random_dot_org-1.0.2.tar.gz",
    "platform": null,
    "description": "Random.org API Wrapper\n======================\n\nThis Python module provides a wrapper for the `Random.org API`_ to generate various types of random data such as integers,\nsequences, decimal fractions, Gaussian numbers, strings, UUIDs, and random blobs.\n\nFeatures\n--------\n\n- Generate random integers, integer sequences, decimal fractions, and Gaussian-distributed numbers.\n- Generate random strings, UUIDs, and blobs.\n- Retrieve API usage statistics, including remaining bits and requests.\n\nInstallation\n------------\n\n\n\nUsage\n-----\n\n1. Import the ``BasicApi`` class and initialize it with your Random.org API key:\n   ::\n\n       from basic_api import BasicApi\n\n       api = BasicApi(api_key=\"your_api_key\")\n\n2. Call the available methods to generate random data. For example, to generate random integers:\n   ::\n\n       random_integers = api.generate_integers(num=5, minimum=1, maximum=100)\n       print(random_integers)\n\n3. You can also check your API usage:\n   ::\n\n       usage_stats = api.get_usage()\n       print(usage_stats)\n\nRunning Tests\n-------------\n\nThe project includes tests written using ``pytest``. To run the tests:\n\n1. Install ``pytest``:\n   ::\n\n       pip install pytest\n\n2. Run the tests:\n   ::\n\n       pytest\n\nLicense\n-------\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n.. _Random.org API: https://api.random.org/\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2012-2024 Scott Chacon and others  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Random.org Api Wrapped in Python",
    "version": "1.0.2",
    "project_urls": {
        "Documentation": "https://nick-seinsche.github.io/py_random_dot_org/",
        "Repository": "https://github.com/Nick-Seinsche/py_random_dot_org"
    },
    "split_keywords": [
        "random",
        " api",
        " wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c0f02976dd3172a4cc15549a37d3c6d81a3cabdf9c17b6b94616b952484845db",
                "md5": "e39922d9173c328e0e052ad67239a62f",
                "sha256": "421baed47d8ebc5673bb0a588c8b52dcf3c0632eb9dce0b1148f5d49f1e151ca"
            },
            "downloads": -1,
            "filename": "py_random_dot_org-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e39922d9173c328e0e052ad67239a62f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 6328,
            "upload_time": "2024-09-12T22:28:00",
            "upload_time_iso_8601": "2024-09-12T22:28:00.954014Z",
            "url": "https://files.pythonhosted.org/packages/c0/f0/2976dd3172a4cc15549a37d3c6d81a3cabdf9c17b6b94616b952484845db/py_random_dot_org-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab5203911dd01e2eccc54e54a381d07a5012c6d2549b8068c9a24b9ffe51b0f9",
                "md5": "2fe735b50a76844067ae2d1c71b1b854",
                "sha256": "e945a973aa0250dda9409fc9623a1234cf39a46cf337d9e2a4dae1e0c1d77d38"
            },
            "downloads": -1,
            "filename": "py_random_dot_org-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2fe735b50a76844067ae2d1c71b1b854",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 6843,
            "upload_time": "2024-09-12T22:28:02",
            "upload_time_iso_8601": "2024-09-12T22:28:02.545573Z",
            "url": "https://files.pythonhosted.org/packages/ab/52/03911dd01e2eccc54e54a381d07a5012c6d2549b8068c9a24b9ffe51b0f9/py_random_dot_org-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-12 22:28:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Nick-Seinsche",
    "github_project": "py_random_dot_org",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "py-random-dot-org"
}
        
Elapsed time: 5.00232s