Skip to main content

C & Python Bloomfilter Based Memeroy || Redis .

Project description

Project description

Iron-Man is a bloom filter based Cython & C. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. It began as a simple Instance around Redis.

Irom-Man offers suggestions, but doesn't enforce any dependencies or project layout. It is up to the developer to choose the tools and libraries they want to use.

Installing

Install and update using pip:

pip install -U iron-man

A Simple Example

from iron_man import LocalBloomFilter

lbf = LocalBloomFilter(capacity=10000,error=0.0001)

# check item is it in filter
print(lbf.is_contain("content"))

# add item to filter
lbf.add("content")
print(lbf.is_contain("content"))

A Redis Example

from iron_man import RedisBloomFilter
from redis import Redis

redis_conn:Redis = Redis()

lbf = RedisBloomFilter(capacity=100000000,error=0.0001,redis_conn=redis_conn,prime_length=True,filter_prefix="bf_test")
# show the how many string will used by redis.
# every string will use 512MB mem.
print(lbf.mem_block_counts) 
# check item is it in filter
print(lbf.is_contain("content"))

# add item to filter
lbf.add("content")
print(lbf.is_contain("content"))

# warning. normally, you don't need to clean BloomFilter.
lbf.clean() 

Links

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

iron_man-1.0.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

iron_man-1.0.3-cp38-cp38-macosx_10_9_x86_64.whl (24.0 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file iron_man-1.0.3.tar.gz.

File metadata

  • Download URL: iron_man-1.0.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for iron_man-1.0.3.tar.gz
Algorithm Hash digest
SHA256 b5d5974a0a8492d18345f00e6f1c6bd762a94e940e58aecda723e9ec70602788
MD5 599621a120701ed9e49b3df6f55ab800
BLAKE2b-256 dbcdac9415c74bd7ddf5f14fc610fc3bb3bb5fa986414d1f83f7c8f15b5656e9

See more details on using hashes here.

File details

Details for the file iron_man-1.0.3-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: iron_man-1.0.3-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for iron_man-1.0.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1e96ed4aaede5cb8a6570cc108476c0075fb3cbddbf5083ef135379a32a627cd
MD5 54c1edafaea73daeeca4296b76b6cd08
BLAKE2b-256 397e8fb146ede1c6c7a135ad248113dc153ec2563b69d7296387d96665c6b5a1

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