ipset-c


Nameipset-c JSON
Version 0.1.0.dev2 PyPI version JSON
download
home_pageNone
SummaryIPSet written in C
upload_time2024-08-01 19:30:10
maintainerNone
docs_urlNone
authorglowlex
requires_python<4,>=3.8
licenseLGPL
keywords network ipset
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ipset_c

IPSet is written in C.
Runs on Windows and Linux.
Tens of times faster than pure Python netaddr.IPSet.
Only for IPv4. Not picklable.


```
pip install ipset_c
```

```
from ipset_c import IPSet
a = IPSet(['12.12.12.0/25', '12.12.12.128/25'])
a.getCidrs()  # ['12.12.12.0/24']
a.addCidr('8.8.8.8/30')
a.getCidrs()  # ['8.8.8.8/30', '12.12.12.0/24']
b = IPSet(['12.12.12.0/25'])
a.isSubset(b)  # False
a.isSuperset(b)  # True
a == b  # False
a <= b  # False
a >= b  # True
a.isContainsCidr("12.12.0.0/16")  # False
a.isIntersectsCidr("12.12.0.0/16")  # True
b.addCidr('4.4.4.4/32')
a.getCidrs()  # ['8.8.8.8/30', '12.12.12.0/24']
b.getCidrs()  # ['4.4.4.4/32', '12.12.12.0/25']
c = a & b
c.getCidrs()  # ['12.12.12.0/25']
c = a | b
c.getCidrs()  # ['4.4.4.4/32', '8.8.8.8/30', '12.12.12.0/24']
c = a - b
c.getCidrs()  # ['8.8.8.8/30', '12.12.12.128/25']
a.removeCidr('8.8.8.8/30')
a.getCidrs()  # ['12.12.12.0/24']
len(a)  # 256
c = a.copy()
bool(IPSet([]))  # False
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ipset-c",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.8",
    "maintainer_email": null,
    "keywords": "network, ipset",
    "author": "glowlex",
    "author_email": "antonioavocado777@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d9/7a/f71c75435d1e8c52564a147c2f315a48c2edc78850a3c3d1b61952e559ee/ipset_c-0.1.0.dev2.tar.gz",
    "platform": null,
    "description": "# ipset_c\n\nIPSet is written in C.\nRuns on Windows and Linux.\nTens of times faster than pure Python netaddr.IPSet.\nOnly for IPv4. Not picklable.\n\n\n```\npip install ipset_c\n```\n\n```\nfrom ipset_c import IPSet\na = IPSet(['12.12.12.0/25', '12.12.12.128/25'])\na.getCidrs()  # ['12.12.12.0/24']\na.addCidr('8.8.8.8/30')\na.getCidrs()  # ['8.8.8.8/30', '12.12.12.0/24']\nb = IPSet(['12.12.12.0/25'])\na.isSubset(b)  # False\na.isSuperset(b)  # True\na == b  # False\na <= b  # False\na >= b  # True\na.isContainsCidr(\"12.12.0.0/16\")  # False\na.isIntersectsCidr(\"12.12.0.0/16\")  # True\nb.addCidr('4.4.4.4/32')\na.getCidrs()  # ['8.8.8.8/30', '12.12.12.0/24']\nb.getCidrs()  # ['4.4.4.4/32', '12.12.12.0/25']\nc = a & b\nc.getCidrs()  # ['12.12.12.0/25']\nc = a | b\nc.getCidrs()  # ['4.4.4.4/32', '8.8.8.8/30', '12.12.12.0/24']\nc = a - b\nc.getCidrs()  # ['8.8.8.8/30', '12.12.12.128/25']\na.removeCidr('8.8.8.8/30')\na.getCidrs()  # ['12.12.12.0/24']\nlen(a)  # 256\nc = a.copy()\nbool(IPSet([]))  # False\n```\n\n",
    "bugtrack_url": null,
    "license": "LGPL",
    "summary": "IPSet written in C",
    "version": "0.1.0.dev2",
    "project_urls": {
        "Source": "https://github.com/glowlex/ipset_c/"
    },
    "split_keywords": [
        "network",
        " ipset"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96f365aa68aa0de794cdb31f0ad58a58fef2b9d5292b193e0ca59901a05f62bd",
                "md5": "f981035861ac59cb9fbeff0542c54d3f",
                "sha256": "4cac9571fe6343cf9b21b300136f3dcdafcbea79a776cb8b05c44e932d2a3168"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp310-cp310-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "f981035861ac59cb9fbeff0542c54d3f",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "<4,>=3.8",
            "size": 17522,
            "upload_time": "2024-08-01T19:30:07",
            "upload_time_iso_8601": "2024-08-01T19:30:07.564929Z",
            "url": "https://files.pythonhosted.org/packages/96/f3/65aa68aa0de794cdb31f0ad58a58fef2b9d5292b193e0ca59901a05f62bd/ipset_c-0.1.0.dev2-cp310-cp310-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c988d192cb044e604faa681d10f1ddb8dafc4a4f13b743a0a7bfc2ba10592dca",
                "md5": "2679c5b83d30d8d4e8bb8813bf33cbe7",
                "sha256": "3eadaf24a4dc1491dc46d09e595aae499eaa0d443ac484b56923f420668c6556"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp310-cp310-manylinux_2_35_x86_64.whl",
            "has_sig": false,
            "md5_digest": "2679c5b83d30d8d4e8bb8813bf33cbe7",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "<4,>=3.8",
            "size": 40761,
            "upload_time": "2024-08-01T19:30:21",
            "upload_time_iso_8601": "2024-08-01T19:30:21.271736Z",
            "url": "https://files.pythonhosted.org/packages/c9/88/d192cb044e604faa681d10f1ddb8dafc4a4f13b743a0a7bfc2ba10592dca/ipset_c-0.1.0.dev2-cp310-cp310-manylinux_2_35_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2658d1dfa2a1e0fa615909a37afa9e46e2679df6fb19223344dd720f8fd593d7",
                "md5": "ec4f01bf0fc96875f5f18453aa8f0f19",
                "sha256": "d2e3502c2812c3175451fea9dcf9c0dc5fef24f1cff5c0f3a836bcdb656197eb"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "ec4f01bf0fc96875f5f18453aa8f0f19",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "<4,>=3.8",
            "size": 12707,
            "upload_time": "2024-08-01T19:31:34",
            "upload_time_iso_8601": "2024-08-01T19:31:34.558794Z",
            "url": "https://files.pythonhosted.org/packages/26/58/d1dfa2a1e0fa615909a37afa9e46e2679df6fb19223344dd720f8fd593d7/ipset_c-0.1.0.dev2-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ab5b946423604ebf1b11c722c2beb9e62ac7cd2c16bffefaf722bcdc8362c68",
                "md5": "51259af08559f8a288eb68215ae5b51c",
                "sha256": "ffcd6ac3ae8d1b7899bf31046936afd4a916dde170ad8bd83a0689b4e36a2c27"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp311-cp311-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "51259af08559f8a288eb68215ae5b51c",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": "<4,>=3.8",
            "size": 17524,
            "upload_time": "2024-08-01T19:30:07",
            "upload_time_iso_8601": "2024-08-01T19:30:07.079026Z",
            "url": "https://files.pythonhosted.org/packages/5a/b5/b946423604ebf1b11c722c2beb9e62ac7cd2c16bffefaf722bcdc8362c68/ipset_c-0.1.0.dev2-cp311-cp311-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef4a9cfd26f356f76da25acd52dc68cc40e59bd249df936fe2dabb744317d5dd",
                "md5": "cf46c1db0ad61fd9a401dcb63e5e6064",
                "sha256": "5fd86ddca56b2a3a03b932ea904f960071a14854ec17e42a6a80cb64cabeb343"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp311-cp311-manylinux_2_35_x86_64.whl",
            "has_sig": false,
            "md5_digest": "cf46c1db0ad61fd9a401dcb63e5e6064",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": "<4,>=3.8",
            "size": 41541,
            "upload_time": "2024-08-01T19:30:13",
            "upload_time_iso_8601": "2024-08-01T19:30:13.271459Z",
            "url": "https://files.pythonhosted.org/packages/ef/4a/9cfd26f356f76da25acd52dc68cc40e59bd249df936fe2dabb744317d5dd/ipset_c-0.1.0.dev2-cp311-cp311-manylinux_2_35_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9755e8fa97ad4fa98850478f2f7bc709ba3d389e85f9dc9161e1f63f6913a7f",
                "md5": "44153ea112e97ff25957806ae9a013e5",
                "sha256": "d32b8f399b2dfc3d7bcd79dbbb2ff5f95f46197a5d150f1d2077694538f7ea7f"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "44153ea112e97ff25957806ae9a013e5",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": "<4,>=3.8",
            "size": 12719,
            "upload_time": "2024-08-01T19:31:09",
            "upload_time_iso_8601": "2024-08-01T19:31:09.353240Z",
            "url": "https://files.pythonhosted.org/packages/e9/75/5e8fa97ad4fa98850478f2f7bc709ba3d389e85f9dc9161e1f63f6913a7f/ipset_c-0.1.0.dev2-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "531c16665ebdbfbbe99d7c8df8d6bfc64c8e95fe98e33476061f1d9bcefddece",
                "md5": "295ada580f76357d676103f1edf52a72",
                "sha256": "ed200c2d3c8dc86cf16daa1cf448b2715c7fbc05c0157904bd72f94b0ed5eba7"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp312-cp312-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "295ada580f76357d676103f1edf52a72",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "<4,>=3.8",
            "size": 17786,
            "upload_time": "2024-08-01T19:30:05",
            "upload_time_iso_8601": "2024-08-01T19:30:05.894554Z",
            "url": "https://files.pythonhosted.org/packages/53/1c/16665ebdbfbbe99d7c8df8d6bfc64c8e95fe98e33476061f1d9bcefddece/ipset_c-0.1.0.dev2-cp312-cp312-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a5a2293125081d445191ab67038055f8a52384f3fd26d259c4781065d9d4e30",
                "md5": "3fb020162b199f1bcca5e3159adef186",
                "sha256": "8fc63e017584406e165c8b575498139bf08714fb1516346488950f736b287134"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp312-cp312-manylinux_2_35_x86_64.whl",
            "has_sig": false,
            "md5_digest": "3fb020162b199f1bcca5e3159adef186",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "<4,>=3.8",
            "size": 41959,
            "upload_time": "2024-08-01T19:30:16",
            "upload_time_iso_8601": "2024-08-01T19:30:16.053002Z",
            "url": "https://files.pythonhosted.org/packages/7a/5a/2293125081d445191ab67038055f8a52384f3fd26d259c4781065d9d4e30/ipset_c-0.1.0.dev2-cp312-cp312-manylinux_2_35_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ffc019022aa6c1e8ced21536670f732f86d2517e6c27d9faa6277d43ad56abd",
                "md5": "2970bcb7dee0565a86f5670c0d6cd9d7",
                "sha256": "4720e81194e38f05f9d8332f2a8b3896360536e30bcbcce443828a7fce20d1c1"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "2970bcb7dee0565a86f5670c0d6cd9d7",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "<4,>=3.8",
            "size": 12784,
            "upload_time": "2024-08-01T19:31:55",
            "upload_time_iso_8601": "2024-08-01T19:31:55.047757Z",
            "url": "https://files.pythonhosted.org/packages/8f/fc/019022aa6c1e8ced21536670f732f86d2517e6c27d9faa6277d43ad56abd/ipset_c-0.1.0.dev2-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f5f5327b9f9adc683fcb618046d00e0f10648119a2f743c2075ff5b2e6169ff",
                "md5": "a2590a33fa84e1095efbc454041db6f8",
                "sha256": "3937833357ea03b49f3c6a82a9ed5e1bee989bf2b090dd866522c247c55f74b0"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp38-cp38-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "a2590a33fa84e1095efbc454041db6f8",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "<4,>=3.8",
            "size": 17502,
            "upload_time": "2024-08-01T19:30:36",
            "upload_time_iso_8601": "2024-08-01T19:30:36.546294Z",
            "url": "https://files.pythonhosted.org/packages/5f/5f/5327b9f9adc683fcb618046d00e0f10648119a2f743c2075ff5b2e6169ff/ipset_c-0.1.0.dev2-cp38-cp38-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57e0ae47d97e0ccc27a7b2446ecb39b3ffa62879f8c7f36ab75c869e775d7a9a",
                "md5": "bbc12beffca8307679bc0231b72d9bc5",
                "sha256": "d653b9f033dc1ac57bf897c5896dffd7e14879739f13fbc46a3efaf682aab8b2"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp38-cp38-manylinux_2_35_x86_64.whl",
            "has_sig": false,
            "md5_digest": "bbc12beffca8307679bc0231b72d9bc5",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "<4,>=3.8",
            "size": 41219,
            "upload_time": "2024-08-01T19:30:17",
            "upload_time_iso_8601": "2024-08-01T19:30:17.624572Z",
            "url": "https://files.pythonhosted.org/packages/57/e0/ae47d97e0ccc27a7b2446ecb39b3ffa62879f8c7f36ab75c869e775d7a9a/ipset_c-0.1.0.dev2-cp38-cp38-manylinux_2_35_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d888772b2ca97c1b6d6ae3a24074905d0619979fac7a152c76c936602d14eed7",
                "md5": "30999c3807dff037397991ea7a4f672b",
                "sha256": "e1267cfae189417efb1f4c031992f933d3c60326aeb1f95b29d96526a2d9ca05"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "30999c3807dff037397991ea7a4f672b",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "<4,>=3.8",
            "size": 12745,
            "upload_time": "2024-08-01T19:31:51",
            "upload_time_iso_8601": "2024-08-01T19:31:51.720174Z",
            "url": "https://files.pythonhosted.org/packages/d8/88/772b2ca97c1b6d6ae3a24074905d0619979fac7a152c76c936602d14eed7/ipset_c-0.1.0.dev2-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e751a7958dd20877edeed1179db407d7c0688ea217a9ff8889814379ca44e330",
                "md5": "982fde3fb653bb8568c9fb30a8d20099",
                "sha256": "67be7b7286c3630dc31f7c30149c088d02a67448318cbfa074470e5a02cd32a0"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp39-cp39-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "982fde3fb653bb8568c9fb30a8d20099",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": "<4,>=3.8",
            "size": 17524,
            "upload_time": "2024-08-01T19:30:11",
            "upload_time_iso_8601": "2024-08-01T19:30:11.246458Z",
            "url": "https://files.pythonhosted.org/packages/e7/51/a7958dd20877edeed1179db407d7c0688ea217a9ff8889814379ca44e330/ipset_c-0.1.0.dev2-cp39-cp39-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5f3374404a4aa9f188ed34065295b7652185cd7a71b7dda22acdc766acbd8f0",
                "md5": "db00fea76983cd1820bbfa32de8dcb9b",
                "sha256": "126102a78e57506070bbd77cca46e4ea90f36a5cbfc928aecda3eeb8f866a2ee"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp39-cp39-manylinux_2_35_x86_64.whl",
            "has_sig": false,
            "md5_digest": "db00fea76983cd1820bbfa32de8dcb9b",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": "<4,>=3.8",
            "size": 40375,
            "upload_time": "2024-08-01T19:30:17",
            "upload_time_iso_8601": "2024-08-01T19:30:17.724747Z",
            "url": "https://files.pythonhosted.org/packages/d5/f3/374404a4aa9f188ed34065295b7652185cd7a71b7dda22acdc766acbd8f0/ipset_c-0.1.0.dev2-cp39-cp39-manylinux_2_35_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a0e8c19b4c7565437e6bcf974a4b8aacc155381bb3dd1c035586418f1dde0fb",
                "md5": "f079505cd7bc0f2098158710e55a32e0",
                "sha256": "e5d2ccb60b9b7b4971a2c86b801f21c069e94986728562cd8d4ac068e831260d"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "f079505cd7bc0f2098158710e55a32e0",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": "<4,>=3.8",
            "size": 12745,
            "upload_time": "2024-08-01T19:31:39",
            "upload_time_iso_8601": "2024-08-01T19:31:39.296989Z",
            "url": "https://files.pythonhosted.org/packages/1a/0e/8c19b4c7565437e6bcf974a4b8aacc155381bb3dd1c035586418f1dde0fb/ipset_c-0.1.0.dev2-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d97af71c75435d1e8c52564a147c2f315a48c2edc78850a3c3d1b61952e559ee",
                "md5": "b80f608172a22aabf3e818726fcc1cc8",
                "sha256": "73476e5b45c2b44a465bdee5431619f3173e4c01695306daf098d653acf974fe"
            },
            "downloads": -1,
            "filename": "ipset_c-0.1.0.dev2.tar.gz",
            "has_sig": false,
            "md5_digest": "b80f608172a22aabf3e818726fcc1cc8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.8",
            "size": 12729,
            "upload_time": "2024-08-01T19:30:10",
            "upload_time_iso_8601": "2024-08-01T19:30:10.321677Z",
            "url": "https://files.pythonhosted.org/packages/d9/7a/f71c75435d1e8c52564a147c2f315a48c2edc78850a3c3d1b61952e559ee/ipset_c-0.1.0.dev2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-01 19:30:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "glowlex",
    "github_project": "ipset_c",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "ipset-c"
}
        
Elapsed time: 9.43057s