LFPWM


NameLFPWM JSON
Version 1.0.9 PyPI version JSON
download
home_page
SummaryLamaForge Encrypted Password Manager
upload_time2023-12-14 15:29:29
maintainer
docs_urlNone
authorLamaForge (Jadon Lama)
requires_python
license
keywords python encryption data password manager user auth
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LFPWM

If you are using it for the first time, you must create a user data table.

Developed in: VSCode

LamaForge PW Manager pip Package Documentation

Summary:
Lamaforge PW Manager is a secure Pypi package for password storage and user authentication.
This program allows users to create a custom user instance with the predefined User class.
Another feature is that you can easily create and store encrypted data of your own or take input from a user
of the developer's application.

Passwords are encrypted before they are stored locally. The database used for this application is SQLite3.
SQLite3 uses a database created on your local machine and is equally as safe as any other database.

Link to repository: https://github.com/gonhunterx/LFPWM

(For specific use examples of methods and parameters
go to the Example Usage in Python section)

Step 1 (in terminal):

```
pip install LFPWM
```

Step 2a: (In your .py file)  
```
from LFPWM.users import User  
```
Step 2b: (In your .py file)  
```
from LFPWM.users import PasswordManager as pm
```
(These steps will allow you to access all functionality of the LFPWM Package.)

After installation,

LFPWM pip package usage:

# Password Manager (PasswordManager)

The PasswordManager class in the LFPWM package is designed to handle the encryption and decryption of passwords. It utilizes the Fernet symmetric encryption scheme from the cryptography library.


## Methods:

encrypt_password(password: str) -> bytes
Encrypts the given plaintext password.

### Parameters:

password (str): The plaintext password to be encrypted.
Returns: The encrypted password.

decrypt_password(encrypted_password) -> str
Decrypts the given encrypted password.

### Parameters:

encrypted_password: The encrypted password.
str: The decrypted plaintext password.

# User Class (User)

The User class represents a user entity and includes methods for managing user information and storing encrypted passwords.

## Methods:

set_username(new_username: str)
Updates the username for the user.

### Parameters:

new_username (str): The new username to set.

set_password(new_password: str)
Updates the password for the user.

### Parameters:

new_password (str): The new password to set.

insert_data(title: str, data: str)
Inserts encrypted password data into the UserData table.

### Parameters:

title (type: string): The title associated with the stored password.
data (type: string): The plaintext password to be encrypted and stored.

get_data()
Retrieves and decrypts stored password data from the UserData table, then prints it.

remove_data(data_to_delete: str)

Deletes password data associated with a given title.

Parameters:
data_to_delete(str): The title of the data to be deleted.

Example Usage
In Python:
from LFPWM.sql_db import create_connection
from LFPWM import User

## Create a user instance

```
user = User("example_user", "example_password")
```

## Set a new username

```
user.set_username("new_username")
```

## Set a new password

```
user.set_password("new_password")
```

## Insert data into UserData table

```
user.insert_data("Email", "user@example.com")
```

## Retrieve and print stored data

```
user.get_data()
```

## Remove data by title

```
user.remove_data("Email")
```

## Encrypt your own data for use

```
Item_to_encrypt = “Hello World”
encrypted_item = PasswordManager.encrypt_password(Item_to_encrypt)
print(encrypted_item)
```

This will print as an encrypted token.
You can also use the PasswordManager’s decrypt_password static method. This will allow you to view the original value behind an encrypted one.

## You can use it like this:

```
decrypted_item = PasswordManager.decrypt_password(encrypted_item)
print(decrypted_item)
```

## This will print “Hello World” (The decrypted value of encrypted_item)

This example demonstrates some possible use cases of the User, and PasswordManager classes and their associated methods.
You can integrate these functionalities into your own projects for secure password management and other data storage uses for small to medium-sized projects.

# Full scale use case:

```
from LFPWM.users import User

if __name__ == "__main__":
    # Register a new user
    user = User.register("john_doe", "secure_password")

    if user:
        # Log in with the registered user
        logged_in_user = User.login("john_doe", "secure_password")

        if logged_in_user:
            # Insert some password data
            logged_in_user.insert_data("Email", "john_doe@example.com")
            logged_in_user.insert_data("Bank", "1234")

            # View stored password data
            print("Stored password data:")
            logged_in_user.get_data()

            # Remove password data
            logged_in_user.remove_data("Bank")

            # View updated password data
            print("Stored password data after removal:")
            logged_in_user.get_data()

            # Set a new username
            logged_in_user.set_username("john_smith")

            # Set a new password
            logged_in_user.set_password("new_secure_password")

            # Log out
            print("Logging out.")
            logged_in_user = None
        else:
            print("Login failed.")
    else:
        print("Registration failed.")

```

### The output for this file:

```
Registration successful.
Stored password data:
Email john_doe@example.com
Bank 1234
Stored password data after removal:
Email john_doe@example.com
Logging out.
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "LFPWM",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,encryption,data,password manager,user auth",
    "author": "LamaForge (Jadon Lama)",
    "author_email": "<lamaforgecode@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/77/69/2b1091da6087acc4996383c48843e7674ca3b84b35207091ffeca18581b3/LFPWM-1.0.9.tar.gz",
    "platform": null,
    "description": "# LFPWM\r\n\r\nIf you are using it for the first time, you must create a user data table.\r\n\r\nDeveloped in: VSCode\r\n\r\nLamaForge PW Manager pip Package Documentation\r\n\r\nSummary:\r\nLamaforge PW Manager is a secure Pypi package for password storage and user authentication.\r\nThis program allows users to create a custom user instance with the predefined User class.\r\nAnother feature is that you can easily create and store encrypted data of your own or take input from a user\r\nof the developer's application.\r\n\r\nPasswords are encrypted before they are stored locally. The database used for this application is SQLite3.\r\nSQLite3 uses a database created on your local machine and is equally as safe as any other database.\r\n\r\nLink to repository: https://github.com/gonhunterx/LFPWM\r\n\r\n(For specific use examples of methods and parameters\r\ngo to the Example Usage in Python section)\r\n\r\nStep 1 (in terminal):\r\n\r\n```\r\npip install LFPWM\r\n```\r\n\r\nStep 2a: (In your .py file)  \r\n```\r\nfrom LFPWM.users import User  \r\n```\r\nStep 2b: (In your .py file)  \r\n```\r\nfrom LFPWM.users import PasswordManager as pm\r\n```\r\n(These steps will allow you to access all functionality of the LFPWM Package.)\r\n\r\nAfter installation,\r\n\r\nLFPWM pip package usage:\r\n\r\n# Password Manager (PasswordManager)\r\n\r\nThe PasswordManager class in the LFPWM package is designed to handle the encryption and decryption of passwords. It utilizes the Fernet symmetric encryption scheme from the cryptography library.\r\n\r\n\r\n## Methods:\r\n\r\nencrypt_password(password: str) -> bytes\r\nEncrypts the given plaintext password.\r\n\r\n### Parameters:\r\n\r\npassword (str): The plaintext password to be encrypted.\r\nReturns: The encrypted password.\r\n\r\ndecrypt_password(encrypted_password) -> str\r\nDecrypts the given encrypted password.\r\n\r\n### Parameters:\r\n\r\nencrypted_password: The encrypted password.\r\nstr: The decrypted plaintext password.\r\n\r\n# User Class (User)\r\n\r\nThe User class represents a user entity and includes methods for managing user information and storing encrypted passwords.\r\n\r\n## Methods:\r\n\r\nset_username(new_username: str)\r\nUpdates the username for the user.\r\n\r\n### Parameters:\r\n\r\nnew_username (str): The new username to set.\r\n\r\nset_password(new_password: str)\r\nUpdates the password for the user.\r\n\r\n### Parameters:\r\n\r\nnew_password (str): The new password to set.\r\n\r\ninsert_data(title: str, data: str)\r\nInserts encrypted password data into the UserData table.\r\n\r\n### Parameters:\r\n\r\ntitle (type: string): The title associated with the stored password.\r\ndata (type: string): The plaintext password to be encrypted and stored.\r\n\r\nget_data()\r\nRetrieves and decrypts stored password data from the UserData table, then prints it.\r\n\r\nremove_data(data_to_delete: str)\r\n\r\nDeletes password data associated with a given title.\r\n\r\nParameters:\r\ndata_to_delete(str): The title of the data to be deleted.\r\n\r\nExample Usage\r\nIn Python:\r\nfrom LFPWM.sql_db import create_connection\r\nfrom LFPWM import User\r\n\r\n## Create a user instance\r\n\r\n```\r\nuser = User(\"example_user\", \"example_password\")\r\n```\r\n\r\n## Set a new username\r\n\r\n```\r\nuser.set_username(\"new_username\")\r\n```\r\n\r\n## Set a new password\r\n\r\n```\r\nuser.set_password(\"new_password\")\r\n```\r\n\r\n## Insert data into UserData table\r\n\r\n```\r\nuser.insert_data(\"Email\", \"user@example.com\")\r\n```\r\n\r\n## Retrieve and print stored data\r\n\r\n```\r\nuser.get_data()\r\n```\r\n\r\n## Remove data by title\r\n\r\n```\r\nuser.remove_data(\"Email\")\r\n```\r\n\r\n## Encrypt your own data for use\r\n\r\n```\r\nItem_to_encrypt = \u201cHello World\u201d\r\nencrypted_item = PasswordManager.encrypt_password(Item_to_encrypt)\r\nprint(encrypted_item)\r\n```\r\n\r\nThis will print as an encrypted token.\r\nYou can also use the PasswordManager\u2019s decrypt_password static method. This will allow you to view the original value behind an encrypted one.\r\n\r\n## You can use it like this:\r\n\r\n```\r\ndecrypted_item = PasswordManager.decrypt_password(encrypted_item)\r\nprint(decrypted_item)\r\n```\r\n\r\n## This will print \u201cHello World\u201d (The decrypted value of encrypted_item)\r\n\r\nThis example demonstrates some possible use cases of the User, and PasswordManager classes and their associated methods.\r\nYou can integrate these functionalities into your own projects for secure password management and other data storage uses for small to medium-sized projects.\r\n\r\n# Full scale use case:\r\n\r\n```\r\nfrom LFPWM.users import User\r\n\r\nif __name__ == \"__main__\":\r\n    # Register a new user\r\n    user = User.register(\"john_doe\", \"secure_password\")\r\n\r\n    if user:\r\n        # Log in with the registered user\r\n        logged_in_user = User.login(\"john_doe\", \"secure_password\")\r\n\r\n        if logged_in_user:\r\n            # Insert some password data\r\n            logged_in_user.insert_data(\"Email\", \"john_doe@example.com\")\r\n            logged_in_user.insert_data(\"Bank\", \"1234\")\r\n\r\n            # View stored password data\r\n            print(\"Stored password data:\")\r\n            logged_in_user.get_data()\r\n\r\n            # Remove password data\r\n            logged_in_user.remove_data(\"Bank\")\r\n\r\n            # View updated password data\r\n            print(\"Stored password data after removal:\")\r\n            logged_in_user.get_data()\r\n\r\n            # Set a new username\r\n            logged_in_user.set_username(\"john_smith\")\r\n\r\n            # Set a new password\r\n            logged_in_user.set_password(\"new_secure_password\")\r\n\r\n            # Log out\r\n            print(\"Logging out.\")\r\n            logged_in_user = None\r\n        else:\r\n            print(\"Login failed.\")\r\n    else:\r\n        print(\"Registration failed.\")\r\n\r\n```\r\n\r\n### The output for this file:\r\n\r\n```\r\nRegistration successful.\r\nStored password data:\r\nEmail john_doe@example.com\r\nBank 1234\r\nStored password data after removal:\r\nEmail john_doe@example.com\r\nLogging out.\r\n```\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "LamaForge Encrypted Password Manager",
    "version": "1.0.9",
    "project_urls": null,
    "split_keywords": [
        "python",
        "encryption",
        "data",
        "password manager",
        "user auth"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a4a96cf5830bcd99530d956f48d4573d25dadaa7566e3db104a7a53454e2bfee",
                "md5": "7648b60df3a4bd55e51f8087d3e0b529",
                "sha256": "7edee625498be519bca56418b7dba43ceddd8a277fc5f114443f4320a1b157c7"
            },
            "downloads": -1,
            "filename": "LFPWM-1.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7648b60df3a4bd55e51f8087d3e0b529",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7476,
            "upload_time": "2023-12-14T15:29:28",
            "upload_time_iso_8601": "2023-12-14T15:29:28.207280Z",
            "url": "https://files.pythonhosted.org/packages/a4/a9/6cf5830bcd99530d956f48d4573d25dadaa7566e3db104a7a53454e2bfee/LFPWM-1.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77692b1091da6087acc4996383c48843e7674ca3b84b35207091ffeca18581b3",
                "md5": "fb2c0f8f7401991c509f3504f5aca814",
                "sha256": "e2a4af57905bd226d23d3980174e8b50d193d4e1fb40b850766ff627e432bb6e"
            },
            "downloads": -1,
            "filename": "LFPWM-1.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "fb2c0f8f7401991c509f3504f5aca814",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5878,
            "upload_time": "2023-12-14T15:29:29",
            "upload_time_iso_8601": "2023-12-14T15:29:29.425553Z",
            "url": "https://files.pythonhosted.org/packages/77/69/2b1091da6087acc4996383c48843e7674ca3b84b35207091ffeca18581b3/LFPWM-1.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-14 15:29:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "lfpwm"
}
        
Elapsed time: 0.17750s