Skip to main content

Strig

GitHub releases PyPI release License: MIT Tests

Strig is an open-source Python utility package for generating random strings and numbers. It is lightweight, flexible, and perfect for use in application backends where unique IDs, secure passwords, or bulk test data are needed.

Features

  • Generate random alphanumeric, alphabetic, or numeric strings.
  • Customize length, prefixes, and casing options.
  • Verify uniqueness against a database.

Installation

Install using PIP

pip install strig

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

Strig can be used to create unique identifiers, test data, or even secure passwords. The simple and customizable functions allow you to specify the format that fits your needs. For detailed documentation and additional functionality, visit the full documentation.

Import strig:

import strig

Generate an alphanumeric string

Generate a 6-character long string composed of letters and numbers.

random_alphanumeric = strig.alphanumeric()
print(random_alphanumeric)  # Example output: 'A3c9Dz'

Generate an alphabetic string

Generate a 10-character long string composed of lower-case letters only.

random_alpha = strig.alpha(length=10, case="lower")
print(random_alpha)  # Example output: 'abcdefghij'

Generate an numeric value

Generate an 8-digit long integer and prefix it with 12. The total number of digits will be 10.

random_numeric = strig.numeric(length=8, prefix=12)
print(random_numeric)  # Example output: 1297637456

Support

If you come across any issues, please create an issue on GitHub.

License

Strig is licensed under the MIT License

Metadata

Release files for strig 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for strig 2.0.0
File Size Uploaded Provenance Actions
strig-2.0.0.tar.gz 8.0 kB Without provenance Details for strig-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for strig 2.0.0
File Interpreter ABI Platform Actions
strig-2.0.0-py3-none-any.whl Python 3 none any Details for strig-2.0.0-py3-none-any.whl

Total release size: 16.5 kB

Release files / strig-2.0.0.tar.gz

Download URL strig-2.0.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
89c5b26fa3739aa0071e2b242985abf452742c3d50c3a42cfc46f1b44e7ccf0d
BLAKE2b-256 checksum
How to use checksums
4614c13c8c2b82d12df862f69aec829e682836f8cb1acc903caeebbe69117dab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / strig-2.0.0-py3-none-any.whl

Download URL strig-2.0.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4144a29ec5adaa06dd25e7c6feea63a42b58c5402f4a6daee36a650c2a60ecb
BLAKE2b-256 checksum
How to use checksums
a1ada7bac2883b55ddfaf6aa685f042fccb877afd138ddbace05459d0c1a7d01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Security for strig 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page