Skip to main content

A simple and intuitive Python package for generating random IDs written in Rust.

Project description

SimpleUID (unique ID) for Python

GitHub releases PyPI release License: MIT

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
  1. Installation
  2. Usage
  3. Support
  4. Maintainer
  5. Contibruting
  6. License

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

MIT LICENSE

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

simpleuid-2.0.0a0.tar.gz (11.5 kB view hashes)

Uploaded Source

Built Distribution

simpleuid-2.0.0a0-cp310-none-win_amd64.whl (126.6 kB view hashes)

Uploaded CPython 3.10 Windows 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