Skip to main content

Unique ids generator implemented in rust

Project description

idika

A simple unique ids generator for python implemented in rust

Algorithms / Implimentations

  • cuid2
  • sonyflakes

Installation

pip install idika

cuid2

import idika

# generate one id
# 10 -> id length
idika.with_cuid(10)
# output: o13q75qk9q


# generate multiple ids
# 10000 -> Count , 10 -> length
idika.n_with_cuid(1000, 10)
"""
output:
[
 'mdse9rnpj1',
 'ub324hvoxm',
 'f1rcv9ysrr',
 'jzeweia5ut',
 'k12lt092sc',
 'k11j9jpbb7',
 ...10000
]
"""

# Pipe
# Run a certain function on all ids generated.
def process_id(id):
    # doing some processing
    # ... e.g database calls 
    print(id)

idika.n_with_cuid(1000, 10).pipe(process_id)

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

idika-0.3.1.tar.gz (9.8 kB view hashes)

Uploaded Source

Built Distributions

idika-0.3.1-cp37-abi3-win_amd64.whl (211.9 kB view hashes)

Uploaded CPython 3.7+ Windows x86-64

idika-0.3.1-cp37-abi3-musllinux_1_2_x86_64.whl (537.8 kB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ x86-64

idika-0.3.1-cp37-abi3-musllinux_1_2_i686.whl (572.1 kB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

idika-0.3.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (375.2 kB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

idika-0.3.1-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (397.8 kB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ i686

idika-0.3.1-cp37-abi3-macosx_11_0_arm64.whl (319.6 kB view hashes)

Uploaded CPython 3.7+ macOS 11.0+ ARM64

idika-0.3.1-cp37-abi3-macosx_10_12_x86_64.whl (323.1 kB view hashes)

Uploaded CPython 3.7+ macOS 10.12+ x86-64

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