Skip to main content

Utilities and tools for my apis and other life hacks.

Project description

icakad

Lightweight utilities for encoding integers into short, URL-friendly tokens.

Installation

pip install icakad

Quickstart

from icakad import ShortURL, encode, decode, ShortURLConfig

token = encode(12345)
assert decode(token) == 12345

custom = ShortURL(ShortURLConfig(alphabet="abcd", min_length=6))
assert custom.encode(5) == "aaaabd"

Features

  • Zero-dependency implementation with a configurable alphabet
  • Encode and decode helpers plus a reusable ShortURL codec
  • Optional minimum length padding for consistent token sizes

Development

To build the package locally:

python -m build

Run tests (if you add them) with:

python -m pytest

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

icakad-0.1.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

icakad-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file icakad-0.1.1.tar.gz.

File metadata

  • Download URL: icakad-0.1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for icakad-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fa04ef6ffcd4d61bf12cf0a8f33aa1bb5e683523c674496b0764fda732c0c402
MD5 5730c3f99bdda0501081aa78810e6564
BLAKE2b-256 7c87498ba517d724a9b30323dbb712e1560069d38d32e4f844da484e8f4870e1

See more details on using hashes here.

File details

Details for the file icakad-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: icakad-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for icakad-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ff4a55255db8780bcc76f0104790564948d8f00851126480a3b00483cb34a12
MD5 c4d67b761134a25c36be51ac9736ab8d
BLAKE2b-256 29e85a1b894088ec372b0f86194a14bf8d44ed32ac631d7f960d7907e88843e6

See more details on using hashes here.

Supported by

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