Name | smartpasslib JSON |
Version |
1.0.4
JSON |
| download |
home_page | None |
Summary | Cross-platform library for generating smart passwords. |
upload_time | 2025-08-24 19:04:55 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | None |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Smart Passwords Library (smartpasslib) <sup>v1.0.4</sup>
[](https://pypi.org/project/smartpasslib/)
[](https://github.com/smartlegionlab/smartpasslib/)

[](https://pypi.org/project/smartpasslib)
[](https://github.com/smartlegionlab/smartpasslib/blob/master/LICENSE)
[](https://pypi.org/project/smartpasslib)
[](https://pepy.tech/projects/smartpasslib)
[](https://pepy.tech/projects/smartpasslib)
[](https://pepy.tech/projects/smartpasslib)
A cross-platform Python library for generating deterministic, secure passwords that never need to be stored.
## 🔥 Key Features
- 🚀 **On-the-fly generation** - Passwords are generated when needed, not stored
- 🔒 **Cryptographically secure** - Uses SHA3-512 and system entropy
- 🔄 **Deterministic output** - Same input always produces same password
- 📱 **Cross-platform** - Works on Linux, Windows, macOS, and Android (Termux)
- 🛠️ **Developer-friendly** - Clean API with full type hints
## 🤝 Supported:
- Linux: All.
- Windows: 7/8/10/11?.
- Termux (Android).
## 📦 Installation
```bash
pip install smartpasslib
```
## 🚀 Quick Start
```python
from smartpasslib import SmartPasswordMaster
# Initialize generator
spm = SmartPasswordMaster()
# Generate a smart password
login = "user@example.com"
secret = "mySecretPhrase"
password = spm.generate_smart_password(login=login, secret=secret, length=16)
# Verify later (without storing the password)
key = spm.generate_public_key(login, secret)
is_valid = spm.check_public_key(login, secret, key) # Returns True
```
## ⚙️ Core Components
### 1. SmartPasswordMaster
The main class for password generation and verification:
```python
from smartpasslib import SmartPasswordMaster
# Generate different types of passwords
basic_pass = SmartPasswordMaster.generate_base_password(length=12)
strong_pass = SmartPasswordMaster.generate_strong_password(length=14)
login = "user@example.com"
secret = "mySecretPhrase"
smart_pass = SmartPasswordMaster.generate_smart_password(login, secret, 16)
# Key management
public_key = SmartPasswordMaster.generate_public_key(login, secret)
is_valid = SmartPasswordMaster.check_public_key(login, secret, public_key)
```
### 2. SmartPasswordManager
For managing password metadata:
```python
from smartpasslib import SmartPasswordManager, SmartPassword, SmartPasswordMaster
manager = SmartPasswordManager()
login = "user@example.com"
secret = "mySecretPhrase"
public_key = SmartPasswordMaster.generate_public_key(login, secret)
# Create and store password metadata
password = SmartPassword(login="user@example.com",
key=public_key,
length=16)
manager.add_smart_password(password)
# Retrieve later
stored_pass = manager.get_smart_password("user@example.com")
```
## 🔧 Advanced Usage
### Password Generation Options
| Method | Description | Recommended Use |
|------------------------------|-----------------------------------------|---------------------|
| `generate_base_password()` | Simple random password | Temporary passwords |
| `generate_strong_password()` | Password with character requirements | User accounts |
| `generate_smart_password()` | Deterministic password from credentials | Main use case |
### Security Notes
- Always keep your `secret` secure - it's required to regenerate passwords
- The `public_key` can be safely stored for verification
- Minimum recommended password length is 12 characters
## 📚 Examples
### CLI Password Generator
```python
from smartpasslib import SmartPasswordMaster
login = input("Enter your login: ")
secret = input("Enter your secret: ")
password = SmartPasswordMaster.generate_smart_password(login, secret, 14)
print(f"Your password: {password}")
```
### Password Manager Integration
```python
from smartpasslib import SmartPasswordManager, SmartPassword, SmartPasswordMaster
manager = SmartPasswordManager()
# Add new account
new_account = SmartPassword(
login="work_email@company.com",
key=SmartPasswordMaster.generate_public_key("work_email@company.com", "workSecret123"),
length=18
)
manager.add_smart_password(new_account)
# Retrieve password later
account = manager.get_smart_password("work_email@company.com")
password = SmartPasswordMaster.generate_smart_password(
account.login,
"workSecret123",
account.length
)
```
### Generate codes for two-factor authentication
```python
from smartpasslib.generators.code import CodeGenerator
code = CodeGenerator.generate(6) # '4&TkIP'
```
## 📜 Licensing
This project is offered under a dual-licensing model.
### 🆓 Option 1: BSD 3-Clause License (for Non-Commercial Use)
This license is **free of charge** and allows you to use the software for:
- Personal and educational purposes
- Academic research and open-source projects
- Evaluation and testing
**Important:** Any use by a commercial organization or for commercial purposes (including internal development and prototyping) requires a commercial license.
### 💼 Option 2: Commercial License (for Commercial Use)
A commercial license is **required** for:
- Integrating this software into proprietary products
- Using it in internal operations within a company
- SaaS and hosted services that incorporate this software
**Important:** The commercial license provides usage rights but **does not include any indemnification or liability**. The software is provided "AS IS" without any warranties as described in the full license agreement.
**To obtain a commercial license,** please contact us directly at:
📧 **smartlegiondev@gmail.com**
## Related Projects
- [Console Password Generator](https://github.com/smartlegionlab/clipassgen/)
- [Console Password Manager](https://github.com/smartlegionlab/clipassman/)
- [Telegram Bot Manager](https://t.me/smartpasswordmanagerbot)
- [Desktop Manager](https://github.com/smartlegionlab/smart_password_manager_desktop/)
## 💻 Information for developers:
- `pip install pytest`
- `pip install pytest-cov`
- `pip install setuptools`
- `pip install wheel`
- `pip install build`
- `pytest tests/ -v`
- `pytest tests/ -v --cov=smartpasslib --cov-report=html`
- `python -m build` or `python setup.py sdist bdist_wheel`
- `twine upload dist/*`

Raw data
{
"_id": null,
"home_page": null,
"name": "smartpasslib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "\"A.A Suvorov\" <smartlegiondev@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/1a/ed/6c87a1b70a3e2522a8a31050ca7b6a8f14a9d4b8a1315be725879cd06a36/smartpasslib-1.0.4.tar.gz",
"platform": null,
"description": "# Smart Passwords Library (smartpasslib) <sup>v1.0.4</sup>\n\n[](https://pypi.org/project/smartpasslib/)\n[](https://github.com/smartlegionlab/smartpasslib/)\n\n[](https://pypi.org/project/smartpasslib)\n[](https://github.com/smartlegionlab/smartpasslib/blob/master/LICENSE)\n[](https://pypi.org/project/smartpasslib)\n\n[](https://pepy.tech/projects/smartpasslib)\n[](https://pepy.tech/projects/smartpasslib)\n[](https://pepy.tech/projects/smartpasslib)\n\nA cross-platform Python library for generating deterministic, secure passwords that never need to be stored.\n\n## \ud83d\udd25 Key Features\n\n- \ud83d\ude80 **On-the-fly generation** - Passwords are generated when needed, not stored\n- \ud83d\udd12 **Cryptographically secure** - Uses SHA3-512 and system entropy\n- \ud83d\udd04 **Deterministic output** - Same input always produces same password\n- \ud83d\udcf1 **Cross-platform** - Works on Linux, Windows, macOS, and Android (Termux)\n- \ud83d\udee0\ufe0f **Developer-friendly** - Clean API with full type hints\n\n## \ud83e\udd1d Supported:\n\n- Linux: All.\n- Windows: 7/8/10/11?.\n- Termux (Android).\n\n## \ud83d\udce6 Installation\n\n```bash\npip install smartpasslib\n```\n\n## \ud83d\ude80 Quick Start\n\n```python\nfrom smartpasslib import SmartPasswordMaster\n\n# Initialize generator\nspm = SmartPasswordMaster()\n\n# Generate a smart password\nlogin = \"user@example.com\"\nsecret = \"mySecretPhrase\"\npassword = spm.generate_smart_password(login=login, secret=secret, length=16)\n\n# Verify later (without storing the password)\nkey = spm.generate_public_key(login, secret)\nis_valid = spm.check_public_key(login, secret, key) # Returns True\n```\n\n## \u2699\ufe0f Core Components\n\n### 1. SmartPasswordMaster\nThe main class for password generation and verification:\n\n```python\nfrom smartpasslib import SmartPasswordMaster\n# Generate different types of passwords\nbasic_pass = SmartPasswordMaster.generate_base_password(length=12)\nstrong_pass = SmartPasswordMaster.generate_strong_password(length=14)\nlogin = \"user@example.com\"\nsecret = \"mySecretPhrase\"\nsmart_pass = SmartPasswordMaster.generate_smart_password(login, secret, 16)\n\n# Key management\npublic_key = SmartPasswordMaster.generate_public_key(login, secret)\nis_valid = SmartPasswordMaster.check_public_key(login, secret, public_key)\n```\n\n### 2. SmartPasswordManager\nFor managing password metadata:\n\n```python\nfrom smartpasslib import SmartPasswordManager, SmartPassword, SmartPasswordMaster\n\nmanager = SmartPasswordManager()\nlogin = \"user@example.com\"\nsecret = \"mySecretPhrase\"\npublic_key = SmartPasswordMaster.generate_public_key(login, secret)\n\n# Create and store password metadata\npassword = SmartPassword(login=\"user@example.com\", \n key=public_key, \n length=16)\nmanager.add_smart_password(password)\n\n# Retrieve later\nstored_pass = manager.get_smart_password(\"user@example.com\")\n```\n\n## \ud83d\udd27 Advanced Usage\n\n### Password Generation Options\n| Method | Description | Recommended Use |\n|------------------------------|-----------------------------------------|---------------------|\n| `generate_base_password()` | Simple random password | Temporary passwords |\n| `generate_strong_password()` | Password with character requirements | User accounts |\n| `generate_smart_password()` | Deterministic password from credentials | Main use case |\n\n### Security Notes\n- Always keep your `secret` secure - it's required to regenerate passwords\n- The `public_key` can be safely stored for verification\n- Minimum recommended password length is 12 characters\n\n## \ud83d\udcda Examples\n\n### CLI Password Generator\n```python\nfrom smartpasslib import SmartPasswordMaster\n\nlogin = input(\"Enter your login: \")\nsecret = input(\"Enter your secret: \")\npassword = SmartPasswordMaster.generate_smart_password(login, secret, 14)\nprint(f\"Your password: {password}\")\n```\n\n### Password Manager Integration\n```python\nfrom smartpasslib import SmartPasswordManager, SmartPassword, SmartPasswordMaster\nmanager = SmartPasswordManager()\n\n# Add new account\nnew_account = SmartPassword(\n login=\"work_email@company.com\",\n key=SmartPasswordMaster.generate_public_key(\"work_email@company.com\", \"workSecret123\"),\n length=18\n)\nmanager.add_smart_password(new_account)\n\n# Retrieve password later\naccount = manager.get_smart_password(\"work_email@company.com\")\npassword = SmartPasswordMaster.generate_smart_password(\n account.login,\n \"workSecret123\",\n account.length\n)\n```\n\n### Generate codes for two-factor authentication\n```python\nfrom smartpasslib.generators.code import CodeGenerator\n\ncode = CodeGenerator.generate(6) # '4&TkIP'\n```\n\n## \ud83d\udcdc Licensing\n\nThis project is offered under a dual-licensing model.\n\n### \ud83c\udd93 Option 1: BSD 3-Clause License (for Non-Commercial Use)\nThis license is **free of charge** and allows you to use the software for:\n- Personal and educational purposes\n- Academic research and open-source projects\n- Evaluation and testing\n\n**Important:** Any use by a commercial organization or for commercial purposes (including internal development and prototyping) requires a commercial license.\n\n### \ud83d\udcbc Option 2: Commercial License (for Commercial Use)\nA commercial license is **required** for:\n- Integrating this software into proprietary products\n- Using it in internal operations within a company\n- SaaS and hosted services that incorporate this software\n\n**Important:** The commercial license provides usage rights but **does not include any indemnification or liability**. The software is provided \"AS IS\" without any warranties as described in the full license agreement.\n\n**To obtain a commercial license,** please contact us directly at: \n\ud83d\udce7 **smartlegiondev@gmail.com**\n\n## Related Projects\n- [Console Password Generator](https://github.com/smartlegionlab/clipassgen/)\n- [Console Password Manager](https://github.com/smartlegionlab/clipassman/)\n- [Telegram Bot Manager](https://t.me/smartpasswordmanagerbot)\n- [Desktop Manager](https://github.com/smartlegionlab/smart_password_manager_desktop/)\n\n\n## \ud83d\udcbb Information for developers:\n\n- `pip install pytest`\n- `pip install pytest-cov`\n- `pip install setuptools`\n- `pip install wheel`\n- `pip install build`\n\n- `pytest tests/ -v`\n- `pytest tests/ -v --cov=smartpasslib --cov-report=html`\n- `python -m build` or `python setup.py sdist bdist_wheel`\n- `twine upload dist/*`\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Cross-platform library for generating smart passwords.",
"version": "1.0.4",
"project_urls": {
"Homepage": "https://github.com/smartlegionlab/smartpasslib"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "83616d8cdff5aa45524e718c2660029732acdd7b35bf74e6d747ba577248f353",
"md5": "b35442f29620eac9c3ce8cee46d0b452",
"sha256": "d6b6bcf342d8d5e463166db79f5e3d98f2d8dd889924a5e32272f5239f8aa11b"
},
"downloads": -1,
"filename": "smartpasslib-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b35442f29620eac9c3ce8cee46d0b452",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 26448,
"upload_time": "2025-08-24T19:04:53",
"upload_time_iso_8601": "2025-08-24T19:04:53.837284Z",
"url": "https://files.pythonhosted.org/packages/83/61/6d8cdff5aa45524e718c2660029732acdd7b35bf74e6d747ba577248f353/smartpasslib-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1aed6c87a1b70a3e2522a8a31050ca7b6a8f14a9d4b8a1315be725879cd06a36",
"md5": "9cd750886ffe062c9fd908bf8fd3983b",
"sha256": "d59538e21b133c4de124ab75065386ae4965a49b5da5d8fdbe4f534285c145b9"
},
"downloads": -1,
"filename": "smartpasslib-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "9cd750886ffe062c9fd908bf8fd3983b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 16143,
"upload_time": "2025-08-24T19:04:55",
"upload_time_iso_8601": "2025-08-24T19:04:55.116470Z",
"url": "https://files.pythonhosted.org/packages/1a/ed/6c87a1b70a3e2522a8a31050ca7b6a8f14a9d4b8a1315be725879cd06a36/smartpasslib-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-24 19:04:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "smartlegionlab",
"github_project": "smartpasslib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "smartpasslib"
}