Skip to main content

A simple and intuitive Python package for generating random strings and numbers.

Project description

Strig

GitHub releases PyPI release License: MIT

A utility package for Python to generate random strings and numbers.

Table of Contents
  1. Installation
  2. Usage
  3. Support
  4. Maintainer
  5. Contibruting
  6. License

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

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

strig-2.0.0a1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

strig-2.0.0a1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

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

Hashes for strig-2.0.0a1.tar.gz
Algorithm Hash digest
SHA256 7a766aa5d49616df9c2d6205959806ec174ab27efd3eb238af3a8bd4888dc62d
MD5 3b2e04c0292646bf3b93d59c801151b9
BLAKE2b-256 9ad52ff5004b19647f4c2a52d609c2b89652217f8b51ba6b4aac5e4cb2d45a31

See more details on using hashes here.

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

Hashes for strig-2.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 e150c7879180d43a374232cf76681247394040fd0484188f2197f92334cbfebc
MD5 175adb771598d58f2017b9f01066f4a4
BLAKE2b-256 1d6de6cda22af830638eb892b038078c8f12073f383242618939d45cd31c05e6

See more details on using hashes here.

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