A simple and intuitive Python package for generating random strings and numbers.
Project description
Strig
A utility package for Python to generate random strings and numbers.
Table of Contents
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
For a more detailed explaination, visit the documentation.
Import strig:
import strig
Create a random string:
strig.alpha()
You can specify the string length and a prefix:
strig.alpha(length=20, prefix='start')
Cursor
Currently only SQL cursor objects are supported. If you encounter issues with other cursor objects, please create an issue on GitHub. The cursor argument should be a dictionairy structured like the example below:
#### SQL example
cursor = {
"cursor": cursor,
"table": "table_name",
"column": "column_name"
}
#### MongoDB example
cursor = {
"cursor": mongo_client["db"],
"column": "column_name",
"type": "mongo"
}
Support
If you come across any issues, please create an issue on GitHub.
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
File details
Details for the file strig-2.0.0a1.tar.gz
.
File metadata
- Download URL: strig-2.0.0a1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a766aa5d49616df9c2d6205959806ec174ab27efd3eb238af3a8bd4888dc62d |
|
MD5 | 3b2e04c0292646bf3b93d59c801151b9 |
|
BLAKE2b-256 | 9ad52ff5004b19647f4c2a52d609c2b89652217f8b51ba6b4aac5e4cb2d45a31 |
File details
Details for the file strig-2.0.0a1-py3-none-any.whl
.
File metadata
- Download URL: strig-2.0.0a1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e150c7879180d43a374232cf76681247394040fd0484188f2197f92334cbfebc |
|
MD5 | 175adb771598d58f2017b9f01066f4a4 |
|
BLAKE2b-256 | 1d6de6cda22af830638eb892b038078c8f12073f383242618939d45cd31c05e6 |