A simple, flexible random ID generator.
Project description
Random ID
A simple, flexible random ID generator.
Installation
pip install random_id
Basic Usage
Importing
from random_id import *
Or
from random_id import random_id
Generating IDs
Call with no arguments for default settings.
random_id()
# -> 'Y4M460zrRMqRuv'
Default IDs are 14 characters long and contain lower/uppercase ascii letters and numbers only (to be URL-safe.)
You can also customize the length and the character set used.
random_id(length=4)
# -> 'Dl3d'
random_id(character_set="abc")
# -> 'bbacabccaaacab'
random_id(length=8, character_set=string.digits)
# -> '27244839'
License
Copyright (C) 2020 AlexiWolf
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file random_id-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: random_id-1.0.1-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbaf5a8f5d2106c4e71196276372c66fe6d8970487b1dc3695cff960e99ab86b |
|
MD5 | f37b27e377545f7ee88b75f49f95e856 |
|
BLAKE2b-256 | 2ced5f7a56908fd5cb9d5b1d6e15551a2a6deac1984f9e619f5a11645f5a7b42 |