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.0.tar.gz (3.7 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.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: icakad-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 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.0.tar.gz
Algorithm Hash digest
SHA256 51d611e39de47f1f7f5289255aaeb045a5ce1a5b86d1e206ba7ead2d81780ab6
MD5 2d7237d94e479151e87b5e90ec412aed
BLAKE2b-256 6b3f9e06615f06e918b489149d3d758b21168eb37bb1b9fcaf8548c5b8eeddeb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: icakad-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9ce963d991c0675109c929b1957943f34ad35f87163439e2e684fd9ded595dd
MD5 119863f0cf823e07db1c2607e891ab19
BLAKE2b-256 806d4a1f2f532256122b10d278706fbb1f1e2c31d14286c41a57d738d607c135

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