# SafeTokenGen
Effortlessly generate secure tokens for your projects with the **SafeTokenGen** package. Simplify the process of creating Passwords, OTPs, PINs, API keys, and Tokens without the hassle of implementing complex algorithms.
## Features:
- Generate Passwords, OTPs, PINs, API keys and Token lists with various options for customization.
- No need to build token generation algorithms from scratch.
- Tokens are never hashed or stored, ensuring top-notch security. It generates only leaving you to store/hash as you please.
- Streamline your development process and save time.
- Get started today and supercharge your token generation workflow.
## Installation
You can install the **SafeTokenGen** package using pip:
```bash
pip install safetokengen
```
# Usage
### API Key Generation
Import the package and use the provided functions to generate API keys and passwords with varying degrees of control.
**Simple API Key Generation**
Generate a simple API key using the `generate_api_key` function:
```python
from safetokengen import generate_api_key
# Generate a hex-based API key with a length of 16 characters
api_key = generate_api_key(16, "hex")
print(api_key) # Example output: "1a2b3c4d5e6f7a8b"
```
You can also generate **alphabetic-based** using "alphabetic" and **alphanumeric-based** keys using "alphanumeric" respectively
**Controlled API Key Generation**
For more control, utilize the `generate_api_key_control` function to generate API keys with prefixes, dividers, and custom options:
```python
from safetokengen import generate_api_key_control
# Generate a controlled API key with a length of 16 characters,
# alphanumeric characters, a prefix, and custom dividers
divider_indices = [4, 9, 13]
custom_divider = "-"
prefix_value = "test"
api_key = generate_api_key_control(16, "alphanumeric", prefix_value, True, divider_indices, custom_divider)
print(api_key) # Example output: "test-FIX2-3ab4c-def5g"
```
### Password Generation
**Simple Password Generation**
Generate a simple password using the `generate_password` function:
```python
from safetokengen import generate_password
# Generate a password with a minimum length of 12 characters
password = generate_password(12)
print(password) # Example output: "jK9$2fA5zH1@"
```
**Controlled Password Generation**
For more control, utilize the `generate_password_control` function to generate passwords with specific criteria:
```python
from safetokengen import generate_password_control
# Generate a password with a minimum length of 12 characters,
# including lowercase, uppercase, numbers, and special characters
password = generate_password_control(12, lower=True, upper=True, numbers=True, special_characters=True)
print(password) # Example output: "xY3!zP8qR@5"
```
### Token List Generation
Generate a list of unique tokens using the `generate_token_list` function:
```python
from safetokengen import generate_token_list
# Generate a list of 10 unique alphanumeric tokens, each with a length of 6 characters
token_list = generate_token_list(6, 10, True)
print(token_list) # Example output: ['1a2b3c', 'x4y5z6', 'pQrStU', ...]
```
### OTP Generation
Generate an OTP using the `generate_otp` function:
```python
from safetokengen import generate_otp
# Generate a 6-digit OTP composed of only digits
otp = generate_otp(6)
print(otp) # Example output: "123456"
```
### PIN Generation
Generate a PIN using the `generate_pin` function:
```python
from safetokengen import generate_pin
# Generate a 4-digit PIN composed of only digits
pin = generate_pin(4)
print(pin) # Example output: "7890"
```
## Contributing
Contributions are encouraged! If you encounter any issues or have ideas for enhancements, feel free to open an issue or submit a pull request.
## License
This project is licensed under the MIT License. See the LICENSE file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/bgraphixx/safetokengen",
"name": "safetokengen",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Ebubechukwu Ibeh <bgraphixx5@gmail.com>, Urias Triumph Baribefi <triumphurias@outlook.com>",
"keywords": "passwords,pins,otp,api keys",
"author": "Ebubechukwu Ibeh",
"author_email": "Ebubechukwu Ibeh <bgraphixx5@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/31/eb/0c5fd1c19849f21fc325cab7b685610b0257eec78133dc6f5a03c39b258e/safetokengen-0.0.5.tar.gz",
"platform": null,
"description": "# SafeTokenGen\n\nEffortlessly generate secure tokens for your projects with the **SafeTokenGen** package. Simplify the process of creating Passwords, OTPs, PINs, API keys, and Tokens without the hassle of implementing complex algorithms.\n\n## Features:\n- Generate Passwords, OTPs, PINs, API keys and Token lists with various options for customization.\n- No need to build token generation algorithms from scratch.\n- Tokens are never hashed or stored, ensuring top-notch security. It generates only leaving you to store/hash as you please.\n- Streamline your development process and save time.\n- Get started today and supercharge your token generation workflow.\n\n## Installation\n\nYou can install the **SafeTokenGen** package using pip:\n\n```bash\npip install safetokengen\n```\n# Usage\n### API Key Generation\nImport the package and use the provided functions to generate API keys and passwords with varying degrees of control.\n\n**Simple API Key Generation**\n\nGenerate a simple API key using the `generate_api_key` function:\n\n```python\nfrom safetokengen import generate_api_key\n\n# Generate a hex-based API key with a length of 16 characters\napi_key = generate_api_key(16, \"hex\")\nprint(api_key) # Example output: \"1a2b3c4d5e6f7a8b\"\n```\nYou can also generate **alphabetic-based** using \"alphabetic\" and **alphanumeric-based** keys using \"alphanumeric\" respectively\n\n**Controlled API Key Generation**\n\nFor more control, utilize the `generate_api_key_control` function to generate API keys with prefixes, dividers, and custom options:\n\n```python\nfrom safetokengen import generate_api_key_control\n\n# Generate a controlled API key with a length of 16 characters,\n# alphanumeric characters, a prefix, and custom dividers\ndivider_indices = [4, 9, 13]\ncustom_divider = \"-\"\nprefix_value = \"test\"\napi_key = generate_api_key_control(16, \"alphanumeric\", prefix_value, True, divider_indices, custom_divider)\nprint(api_key) # Example output: \"test-FIX2-3ab4c-def5g\"\n\n```\n\n### Password Generation\n\n**Simple Password Generation**\n\nGenerate a simple password using the `generate_password` function:\n\n```python\nfrom safetokengen import generate_password\n\n# Generate a password with a minimum length of 12 characters\npassword = generate_password(12)\nprint(password) # Example output: \"jK9$2fA5zH1@\"\n```\n\n**Controlled Password Generation**\n\nFor more control, utilize the `generate_password_control` function to generate passwords with specific criteria:\n\n```python\nfrom safetokengen import generate_password_control\n\n# Generate a password with a minimum length of 12 characters,\n# including lowercase, uppercase, numbers, and special characters\npassword = generate_password_control(12, lower=True, upper=True, numbers=True, special_characters=True)\nprint(password) # Example output: \"xY3!zP8qR@5\"\n\n```\n\n### Token List Generation\n\nGenerate a list of unique tokens using the `generate_token_list` function:\n\n```python\nfrom safetokengen import generate_token_list\n\n# Generate a list of 10 unique alphanumeric tokens, each with a length of 6 characters\ntoken_list = generate_token_list(6, 10, True)\nprint(token_list) # Example output: ['1a2b3c', 'x4y5z6', 'pQrStU', ...]\n```\n\n### OTP Generation\n\nGenerate an OTP using the `generate_otp` function:\n\n```python\nfrom safetokengen import generate_otp\n\n# Generate a 6-digit OTP composed of only digits\notp = generate_otp(6)\nprint(otp) # Example output: \"123456\"\n```\n\n### PIN Generation\nGenerate a PIN using the `generate_pin` function:\n\n```python\nfrom safetokengen import generate_pin\n\n# Generate a 4-digit PIN composed of only digits\npin = generate_pin(4)\nprint(pin) # Example output: \"7890\"\n```\n\n## Contributing\nContributions are encouraged! If you encounter any issues or have ideas for enhancements, feel free to open an issue or submit a pull request.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Generate Passwords, OTPs, PINs, API keys and Token lists with various options for customization.",
"version": "0.0.5",
"project_urls": {
"Bug Tracker": "https://github.com/bgraphixx/SafeTokenGen/issues",
"Homepage": "https://github.com/bgraphixx/SafeTokenGen"
},
"split_keywords": [
"passwords",
"pins",
"otp",
"api keys"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "12ecdd503b071d665a189464d2a6ee94192e5b0919db3a93cafd3998fe46abe5",
"md5": "cdf6628911ce959d42bb2a19f8f0aa69",
"sha256": "2fbd6f4c1125fcd5c4c397c1785978a4d272a463d48999a6d736e227a17e1da7"
},
"downloads": -1,
"filename": "safetokengen-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cdf6628911ce959d42bb2a19f8f0aa69",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 5026,
"upload_time": "2023-08-29T10:49:33",
"upload_time_iso_8601": "2023-08-29T10:49:33.066784Z",
"url": "https://files.pythonhosted.org/packages/12/ec/dd503b071d665a189464d2a6ee94192e5b0919db3a93cafd3998fe46abe5/safetokengen-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "31eb0c5fd1c19849f21fc325cab7b685610b0257eec78133dc6f5a03c39b258e",
"md5": "16ac4225493ea0131c5ef0a5c469dfec",
"sha256": "1d5e0e66887ed96056ce6237e4f3b89b61a79c5e0d50d2c83a76290d52985827"
},
"downloads": -1,
"filename": "safetokengen-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "16ac4225493ea0131c5ef0a5c469dfec",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 5690,
"upload_time": "2023-08-29T10:49:34",
"upload_time_iso_8601": "2023-08-29T10:49:34.587422Z",
"url": "https://files.pythonhosted.org/packages/31/eb/0c5fd1c19849f21fc325cab7b685610b0257eec78133dc6f5a03c39b258e/safetokengen-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-29 10:49:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bgraphixx",
"github_project": "safetokengen",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "safetokengen"
}