Skip to main content

IPSet written in C

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipset_c-0.1.0.dev2.tar.gz (12.7 kB view details)

Uploaded Source

Built Distributions

ipset_c-0.1.0.dev2-cp312-cp312-win_amd64.whl (12.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

ipset_c-0.1.0.dev2-cp312-cp312-manylinux_2_35_x86_64.whl (42.0 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.35+ x86-64

ipset_c-0.1.0.dev2-cp312-cp312-macosx_14_0_arm64.whl (17.8 kB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

ipset_c-0.1.0.dev2-cp311-cp311-win_amd64.whl (12.7 kB view details)

Uploaded CPython 3.11 Windows x86-64

ipset_c-0.1.0.dev2-cp311-cp311-manylinux_2_35_x86_64.whl (41.5 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.35+ x86-64

ipset_c-0.1.0.dev2-cp311-cp311-macosx_14_0_arm64.whl (17.5 kB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

ipset_c-0.1.0.dev2-cp310-cp310-win_amd64.whl (12.7 kB view details)

Uploaded CPython 3.10 Windows x86-64

ipset_c-0.1.0.dev2-cp310-cp310-manylinux_2_35_x86_64.whl (40.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.35+ x86-64

ipset_c-0.1.0.dev2-cp310-cp310-macosx_14_0_arm64.whl (17.5 kB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

ipset_c-0.1.0.dev2-cp39-cp39-win_amd64.whl (12.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

ipset_c-0.1.0.dev2-cp39-cp39-manylinux_2_35_x86_64.whl (40.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.35+ x86-64

ipset_c-0.1.0.dev2-cp39-cp39-macosx_14_0_arm64.whl (17.5 kB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

ipset_c-0.1.0.dev2-cp38-cp38-win_amd64.whl (12.7 kB view details)

Uploaded CPython 3.8 Windows x86-64

ipset_c-0.1.0.dev2-cp38-cp38-manylinux_2_35_x86_64.whl (41.2 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.35+ x86-64

ipset_c-0.1.0.dev2-cp38-cp38-macosx_14_0_arm64.whl (17.5 kB view details)

Uploaded CPython 3.8 macOS 14.0+ ARM64

File details

Details for the file ipset_c-0.1.0.dev2.tar.gz.

File metadata

  • Download URL: ipset_c-0.1.0.dev2.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for ipset_c-0.1.0.dev2.tar.gz
Algorithm Hash digest
SHA256 73476e5b45c2b44a465bdee5431619f3173e4c01695306daf098d653acf974fe
MD5 b80f608172a22aabf3e818726fcc1cc8
BLAKE2b-256 d97af71c75435d1e8c52564a147c2f315a48c2edc78850a3c3d1b61952e559ee

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4720e81194e38f05f9d8332f2a8b3896360536e30bcbcce443828a7fce20d1c1
MD5 2970bcb7dee0565a86f5670c0d6cd9d7
BLAKE2b-256 8ffc019022aa6c1e8ced21536670f732f86d2517e6c27d9faa6277d43ad56abd

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp312-cp312-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 8fc63e017584406e165c8b575498139bf08714fb1516346488950f736b287134
MD5 3fb020162b199f1bcca5e3159adef186
BLAKE2b-256 7a5a2293125081d445191ab67038055f8a52384f3fd26d259c4781065d9d4e30

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ed200c2d3c8dc86cf16daa1cf448b2715c7fbc05c0157904bd72f94b0ed5eba7
MD5 295ada580f76357d676103f1edf52a72
BLAKE2b-256 531c16665ebdbfbbe99d7c8df8d6bfc64c8e95fe98e33476061f1d9bcefddece

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d32b8f399b2dfc3d7bcd79dbbb2ff5f95f46197a5d150f1d2077694538f7ea7f
MD5 44153ea112e97ff25957806ae9a013e5
BLAKE2b-256 e9755e8fa97ad4fa98850478f2f7bc709ba3d389e85f9dc9161e1f63f6913a7f

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp311-cp311-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 5fd86ddca56b2a3a03b932ea904f960071a14854ec17e42a6a80cb64cabeb343
MD5 cf46c1db0ad61fd9a401dcb63e5e6064
BLAKE2b-256 ef4a9cfd26f356f76da25acd52dc68cc40e59bd249df936fe2dabb744317d5dd

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ffcd6ac3ae8d1b7899bf31046936afd4a916dde170ad8bd83a0689b4e36a2c27
MD5 51259af08559f8a288eb68215ae5b51c
BLAKE2b-256 5ab5b946423604ebf1b11c722c2beb9e62ac7cd2c16bffefaf722bcdc8362c68

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d2e3502c2812c3175451fea9dcf9c0dc5fef24f1cff5c0f3a836bcdb656197eb
MD5 ec4f01bf0fc96875f5f18453aa8f0f19
BLAKE2b-256 2658d1dfa2a1e0fa615909a37afa9e46e2679df6fb19223344dd720f8fd593d7

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp310-cp310-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 3eadaf24a4dc1491dc46d09e595aae499eaa0d443ac484b56923f420668c6556
MD5 2679c5b83d30d8d4e8bb8813bf33cbe7
BLAKE2b-256 c988d192cb044e604faa681d10f1ddb8dafc4a4f13b743a0a7bfc2ba10592dca

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4cac9571fe6343cf9b21b300136f3dcdafcbea79a776cb8b05c44e932d2a3168
MD5 f981035861ac59cb9fbeff0542c54d3f
BLAKE2b-256 96f365aa68aa0de794cdb31f0ad58a58fef2b9d5292b193e0ca59901a05f62bd

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e5d2ccb60b9b7b4971a2c86b801f21c069e94986728562cd8d4ac068e831260d
MD5 f079505cd7bc0f2098158710e55a32e0
BLAKE2b-256 1a0e8c19b4c7565437e6bcf974a4b8aacc155381bb3dd1c035586418f1dde0fb

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp39-cp39-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 126102a78e57506070bbd77cca46e4ea90f36a5cbfc928aecda3eeb8f866a2ee
MD5 db00fea76983cd1820bbfa32de8dcb9b
BLAKE2b-256 d5f3374404a4aa9f188ed34065295b7652185cd7a71b7dda22acdc766acbd8f0

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 67be7b7286c3630dc31f7c30149c088d02a67448318cbfa074470e5a02cd32a0
MD5 982fde3fb653bb8568c9fb30a8d20099
BLAKE2b-256 e751a7958dd20877edeed1179db407d7c0688ea217a9ff8889814379ca44e330

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e1267cfae189417efb1f4c031992f933d3c60326aeb1f95b29d96526a2d9ca05
MD5 30999c3807dff037397991ea7a4f672b
BLAKE2b-256 d888772b2ca97c1b6d6ae3a24074905d0619979fac7a152c76c936602d14eed7

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp38-cp38-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 d653b9f033dc1ac57bf897c5896dffd7e14879739f13fbc46a3efaf682aab8b2
MD5 bbc12beffca8307679bc0231b72d9bc5
BLAKE2b-256 57e0ae47d97e0ccc27a7b2446ecb39b3ffa62879f8c7f36ab75c869e775d7a9a

See more details on using hashes here.

File details

Details for the file ipset_c-0.1.0.dev2-cp38-cp38-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for ipset_c-0.1.0.dev2-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 3937833357ea03b49f3c6a82a9ed5e1bee989bf2b090dd866522c247c55f74b0
MD5 a2590a33fa84e1095efbc454041db6f8
BLAKE2b-256 5f5f5327b9f9adc683fcb618046d00e0f10648119a2f743c2075ff5b2e6169ff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page