entropython


Nameentropython JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryA Python module for efficient calculation of Shannon byte entropy based on Rust
upload_time2024-08-14 12:04:51
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2020 Fraunhofer FKIE 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 entropy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # entropython

A Python module for efficient calculation of Shannon byte entropy based on Rust.

## Installation

To install the version from pypi.org run
```shell
pip install entropython
```

To install the latest version directly from GitHub run
```shell
pip git+https://github.com/fkie-cad/entropython
```
(you need to [have rust installed](https://www.rust-lang.org/tools/install))
or check out the repository and run
```shell
pip install .
``` 

## Usage

```python
from entropython import shannon_entropy, metric_entropy

byte_str = (
    b'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod ' 
    b'tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.'
)
print(shannon_entropy(byte_str))
print(metric_entropy(byte_str))
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "entropython",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "entropy",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/1c/d5/9d4a53cef2e5189d98ca11aa3402ae68a64f645c00f737830d363569f68c/entropython-1.1.0.tar.gz",
    "platform": null,
    "description": "# entropython\n\nA Python module for efficient calculation of Shannon byte entropy based on Rust.\n\n## Installation\n\nTo install the version from pypi.org run\n```shell\npip install entropython\n```\n\nTo install the latest version directly from GitHub run\n```shell\npip git+https://github.com/fkie-cad/entropython\n```\n(you need to [have rust installed](https://www.rust-lang.org/tools/install))\nor check out the repository and run\n```shell\npip install .\n``` \n\n## Usage\n\n```python\nfrom entropython import shannon_entropy, metric_entropy\n\nbyte_str = (\n    b'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod ' \n    b'tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.'\n)\nprint(shannon_entropy(byte_str))\nprint(metric_entropy(byte_str))\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2020 Fraunhofer FKIE  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": "A Python module for efficient calculation of Shannon byte entropy based on Rust",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/fkie-cad/entropython"
    },
    "split_keywords": [
        "entropy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a3891ff4274d4542dabd511a7bd04fac4432ae911366bb26586b7224471cb6d5",
                "md5": "75d4416996a2640e94cad37013a22d82",
                "sha256": "91f5dce4c2130f408ebf96a08654679148f4faaa7d84ad68a3532c531a03ff97"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "75d4416996a2640e94cad37013a22d82",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 225406,
            "upload_time": "2024-08-14T12:04:37",
            "upload_time_iso_8601": "2024-08-14T12:04:37.269487Z",
            "url": "https://files.pythonhosted.org/packages/a3/89/1ff4274d4542dabd511a7bd04fac4432ae911366bb26586b7224471cb6d5/entropython-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b77393ce8f1ad461b05865f2049314d51375bb3026b94bd3f578c6b5c87c35f5",
                "md5": "6bacaaea483b4f56820b06a0212d575a",
                "sha256": "339277f63b40e2e2907ef831eec5543ebaa8d3143cee648c1a5286e43f7c2025"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "6bacaaea483b4f56820b06a0212d575a",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 217804,
            "upload_time": "2024-08-14T12:04:40",
            "upload_time_iso_8601": "2024-08-14T12:04:40.487817Z",
            "url": "https://files.pythonhosted.org/packages/b7/73/93ce8f1ad461b05865f2049314d51375bb3026b94bd3f578c6b5c87c35f5/entropython-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e16a32dbe254081efed4ea0d2abbd31bb243e759f2ac06fa062dc62c0d256439",
                "md5": "9e175554e7a188b378afe35d976b873a",
                "sha256": "80ff583d525508bd8dfff53764808779245ec7fe5cce0177d3a287b29f33480f"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "9e175554e7a188b378afe35d976b873a",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 225175,
            "upload_time": "2024-08-14T12:04:43",
            "upload_time_iso_8601": "2024-08-14T12:04:43.108063Z",
            "url": "https://files.pythonhosted.org/packages/e1/6a/32dbe254081efed4ea0d2abbd31bb243e759f2ac06fa062dc62c0d256439/entropython-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6893e63e264533aa0fb01072b53591cce7d9729b5d5c6b910021641ce9c921a",
                "md5": "c66ab8d01468ff520bfdefb4e86129d1",
                "sha256": "4b27a7dc67ab276b69cf72ec18d19dc5c7050f2aedd344c7b64e2d8ef94b4c58"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "c66ab8d01468ff520bfdefb4e86129d1",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 217484,
            "upload_time": "2024-08-14T12:04:45",
            "upload_time_iso_8601": "2024-08-14T12:04:45.991854Z",
            "url": "https://files.pythonhosted.org/packages/b6/89/3e63e264533aa0fb01072b53591cce7d9729b5d5c6b910021641ce9c921a/entropython-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aabb7dc9220c4a734b6f4620827caea09ab166a7665b2906be3a4d7636f73b7a",
                "md5": "ec74e7d38b5642736edfe662e8a52b39",
                "sha256": "778ff97c94ead9d75ac19527020a66a6de74a13820174ef12c9f34dd317ff689"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "ec74e7d38b5642736edfe662e8a52b39",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 224781,
            "upload_time": "2024-08-14T12:04:48",
            "upload_time_iso_8601": "2024-08-14T12:04:48.324463Z",
            "url": "https://files.pythonhosted.org/packages/aa/bb/7dc9220c4a734b6f4620827caea09ab166a7665b2906be3a4d7636f73b7a/entropython-1.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "01e4deebe73d22f8e2b3c69de662a8a483e1340ebe68ed553eb3a009e09994c4",
                "md5": "f190975b6dc120e3bc38091963ee958f",
                "sha256": "d1d2d5c1b98a2e765e8ea19ae51c302ad19efed2e580b7cacacdc9260818958b"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f190975b6dc120e3bc38091963ee958f",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 217245,
            "upload_time": "2024-08-14T12:04:50",
            "upload_time_iso_8601": "2024-08-14T12:04:50.042267Z",
            "url": "https://files.pythonhosted.org/packages/01/e4/deebe73d22f8e2b3c69de662a8a483e1340ebe68ed553eb3a009e09994c4/entropython-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3291a1197b487d0a1196c501344bf5b8846166fc9704288df838e2f87101420",
                "md5": "1c29ea91af10a87f9e9d311bc66fda54",
                "sha256": "fedba291bdb715bd60d2cf721940e937061447d2922d48dab8eb9f06ff354f32"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "1c29ea91af10a87f9e9d311bc66fda54",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 225240,
            "upload_time": "2024-08-14T12:04:28",
            "upload_time_iso_8601": "2024-08-14T12:04:28.145457Z",
            "url": "https://files.pythonhosted.org/packages/e3/29/1a1197b487d0a1196c501344bf5b8846166fc9704288df838e2f87101420/entropython-1.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60dd5b57d6a4b4333cb60f68b754b01d5cf3a753d7c569e41d9f05a9420f22d8",
                "md5": "dcd6d3e972c2ce2883e105db502af1e0",
                "sha256": "650b3f4be377331daaab9cd9e75a894b61d642f2f68038ae4a50e6cec3d37287"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "dcd6d3e972c2ce2883e105db502af1e0",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 217735,
            "upload_time": "2024-08-14T12:04:30",
            "upload_time_iso_8601": "2024-08-14T12:04:30.480095Z",
            "url": "https://files.pythonhosted.org/packages/60/dd/5b57d6a4b4333cb60f68b754b01d5cf3a753d7c569e41d9f05a9420f22d8/entropython-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "38e95b61e04f9addc01a81ea3ff0ca4b49819dac26a04da31c7f6fc020de9804",
                "md5": "559c96cf7e78a52c7c200a4c01ec2407",
                "sha256": "1be4afa544302fe351b55201f1a28141e1a28935b8f38702f8eac34c604d8a89"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "559c96cf7e78a52c7c200a4c01ec2407",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 225502,
            "upload_time": "2024-08-14T12:04:32",
            "upload_time_iso_8601": "2024-08-14T12:04:32.799231Z",
            "url": "https://files.pythonhosted.org/packages/38/e9/5b61e04f9addc01a81ea3ff0ca4b49819dac26a04da31c7f6fc020de9804/entropython-1.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e862dd7da6af5974457f527eaa532a95b8950110b8a9a3e195b9e99c7e317097",
                "md5": "183075792f3faa65c0886d5a873c477d",
                "sha256": "c8074ea542281e8f8fb89cc9a9112339d794840c489e7982939998e9fcd2d4f0"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "183075792f3faa65c0886d5a873c477d",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 217977,
            "upload_time": "2024-08-14T12:04:35",
            "upload_time_iso_8601": "2024-08-14T12:04:35.155259Z",
            "url": "https://files.pythonhosted.org/packages/e8/62/dd7da6af5974457f527eaa532a95b8950110b8a9a3e195b9e99c7e317097/entropython-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1cd59d4a53cef2e5189d98ca11aa3402ae68a64f645c00f737830d363569f68c",
                "md5": "56a96b5028d8ef87cc635635cb158ea1",
                "sha256": "2a9486e4cc4577e871cc17097644d69cc35b68becb5d054163f6aaaf8b82aec5"
            },
            "downloads": -1,
            "filename": "entropython-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "56a96b5028d8ef87cc635635cb158ea1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3860,
            "upload_time": "2024-08-14T12:04:51",
            "upload_time_iso_8601": "2024-08-14T12:04:51.308489Z",
            "url": "https://files.pythonhosted.org/packages/1c/d5/9d4a53cef2e5189d98ca11aa3402ae68a64f645c00f737830d363569f68c/entropython-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-14 12:04:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fkie-cad",
    "github_project": "entropython",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "entropython"
}
        
Elapsed time: 0.31305s