A simple and intuitive Python package for generating random IDs written in Rust.
Project description
SimpleUID (unique ID) for Python
A simple and intuitive Python package for generating unique IDs written in Rust.
This package helps developers by bringing them some "quality of life" features. Stop rewriting the same piece of code in every project.
Table of Contents
Installation
Install using PIP
pip install simpleuid
Note that pip
refers to the Python 3 package manager. In an environment where Python 2 is also present the correct command may be pip3
.
Usage
For a more detailed explaination, visit the documentation.
Import simpleUID:
import simpleuid
Create a random string with letters and numbers:
simpleuid.alphanumeric()
Or just letters:
simpleuid.alpha()
or just numbers:
simpleuid.numeric()
You can specify the string length and a prefix:
simpleuid.alphanumeric(length=20, prefix='start')
Methods alphanumeric
and alpha
allow you the choice for only uppercase
or lowercase
characters. The default for this is all
.
simpleuid.alphanumeric(case="all") ## Both UPPERCASE and lowercase (default)
simpleuid.alphanumeric(case="upper") ## ONLY UPPERCASE
simpleuid.alphanumeric(case="lower") ## only lowercase
All functions are:
Function | Functionality |
---|---|
alphanumeric | Generates a random string containing both letters and numbers. |
alpha | Generates a random string containing only letters. |
numeric | Generates a random string containing only numbers |
var | Generates a string based on a variable string provided by the user |
Support
If you found a problem with the software, please create an issue on GitHub.
Maintainer
This project is maintained by Wibo Kuipers.
Contributing
Your contributions are highly appreciated. Please create a pull request on GitHub. Bigger changes need to be discussed with the development team via the issues section at GitHub first.
License
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 Distribution
Built Distribution
Hashes for simpleuid-2.0.0a0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | caeef2a46b18c8883047dd08a91d9d27e64cb9b0baed59c66e57677664fdebc4 |
|
MD5 | dd5341a90161c46e618aa4009234be6e |
|
BLAKE2b-256 | 10f2572808879724acc66f40cd6ac3876926a6359af84b4bf7f41b1383d7c961 |