pwd-manager-python 0.2.0
Library for secure password retrieving.
License: MIT
Requires Python: >=3.8.1

# PWD manager - Password Manager

PWD Manager is a library designed to securely retrieve passwords from a credentials file.

## Operating System

Windows or Unix.

## Python Version

Project version is Python 3.8.1 or higher.

## User manual

1. To install the library, use the following pip command:

~~~bash
pip install git+<path_to_ssh_or_https>.git
~~~

Input user credentials if using HTTPS.

2. Usage.

2.1. After installation, create a .py file (e.g., `__main__.py`) and use the following example:

~~~python
from pwd_manager_python.pwd_mng import PasswordsManager

getpwd = PasswordsManager()
...
# Using where you need
print(f"Password:{getpwd[key]}")
~~~

2.2. Password Manager uses the default path defined by the DEFAULT_LINK_TO_CRED constant [see here](pwd_manager_python/pwd_mng.py). If you need to use a different path, specify it when initializing the PasswordsManager object.

~~~python
...
# Specify a new path to the credentials file
getpwd = PasswordsManager('<path_to_credential>')
...
~~~

2.3. Also, after installation the library can be launched from the command line:
~~~bash
pwd_manager_python <key for the password>
~~~

## Development Installation

1. Clone the project into your workspace.
~~~bash
cd <path_to_projects_folder>
git clone <repository_url>
~~~
2. Create a virtual environment in your workspace. (I use the `virtualenv` library, but you can use any other method you prefer.)
3. Install Poetry in your environment:

~~~bash
pip install poetry
~~~

4. Install the project dependencies:

~~~bash
poetry install
~~~

## Development test

After installation, use the `tests` folder to run the existing tests and create new ones.

Then run the tests with:

~~~bash
poetry run pytest
~~~

## Code Compatibility Across Python Versions

To ensure compatibility across various Python versions, use the `tox` package. It is included in the dev group of Poetry dependencies.

1. Install Python Versions
Before running tox, install the required Python versions on your device. The list of supported versions can be found in the tox.toml file of this project:

~~~toml
env_list = [<list_of_versions>]
~~~

2. Run Tox
After installing the necessary Python versions, run the following commands in your virtual environment console:

~~~bash
cd <path_to_project>
tox run
~~~

## Code Typing Check

To verify the type hints in your code, use `mypy`. If your IDE supports `mypy` extension, enable it for seamless integration. Alternatively, run the following command:

~~~bash
cd <path_to_project>
poetry run mypy .
~~~

## Development Build

After completing development, update the version in the `pyproject.toml` file under [tool.poetry] section.

### Versioning Rules:

1. For Major Changes:
Increment the major version if you make incompatible code changes:
~~~toml
# previous_version
version = "0.1.0"
# new_version
version = "1.0.0"
~~~

2. For Minor Changes:
Increment the minor version if you add backward-compatible functionality:
~~~toml
# previous_version
version = "0.1.0"
# new_version
version = "0.2.0"
~~~

3. For Patch Updates:
Increment the patch version if you make backward-compatible bug fixes:
~~~toml
# previous_version
version = "0.1.0"
# new_version
version = "0.1.1"
~~~