Metadata-Version: 2.1
Name: MrLou-modules
Version: 0.2.1
Summary: A package with multiple little scripts that i keep re-using
Home-page: https://github.com/lpdescamps/MrLou_modules
Author: Louis-Philippe Descamps
Author-email: me@lpdne.eu
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# MrLou Modules

## Overview
The `MrLou_modules` is a collection of Python package that I keep re-using and thought would be good to share them

## Contributing
If you would like to contribute to this project, please fork the repository and submit a pull request with your changes. Ensure that your code follows the existing style and includes appropriate tests.

## License
This project is licensed under the MIT License. See the LICENSE file for details.

## Installation

You can install the package from PyPI using pip:

```
pip install MrLou_modules
```

# Random_Message

## Overview

The `Random_Message` in `MrLou_modules` is a Python package that provides a collection of random messages, including fun facts and jokes. 
This package is designed to be easy to use and integrate into your Python projects to add a touch of randomness and fun.
I'm using it in script that takes a bit long to complete so printing out those messages keep me awake

## Usage
To use the package in your Python script, follow these steps:

1. Import the necessary function:

```
from MrLou_modules.Random_Message.random_message import get_random_message
```

2. Get a random message:

```
message = get_random_message()
print(message)
```

The `get_random_message` function will alternately return a joke or a fun fact each time it is called.

## Example
Here’s a simple example of how to use `MrLou_modules`:

```
from MrLou_modules.Random_Message.random_message import get_random_message

# Print a random message
print(get_random_message())
```

### Functions
- `get_random_message()`: Returns a random message, alternating between jokes and fun facts.

### Modules
- `fun_facts.py`: Contains a list of interesting and random fun facts. Example facts include:

- `jokes.py`: Contains a list of light-hearted programming jokes. Example jokes include:

- `random_message.py`: Provides the get_random_message function that alternates between fun facts and jokes.

# Cyberark

The `cyberark_api` is a collection of one API for now :-)
The `variables.py` contain all the configuration values such as URIs, certificate paths, and usernames
the `cyberark_api.py` has one class with a function `get_credentials` that you can use to pull credential stored in Cyberark

## Example
Here’s a simple example of how to use `MrLou_modules`:

create a variables.py with your variables by adjusting the <>:

for example, 
AppID = "<AppID>" to AppID = "MyAppIDexample"
ca_cert = r'C:\path\to\Trusted_Root_Certificates.pem' to ca_cert = r'C:\cert\cyberark\Trusted_Root_Certificates.pem'

```
# variables.py

# CyberArk API configurations

URI = "https://<IIS_Server_Ip>/AIMWebService/api/Accounts"
AppID = "<AppID>"
Safe = "<Safe>"
Folder = "<Folder>"
Username = "<Username>"
Object = f"<Object>{Username}"


ca_cert = r'C:\path\to\Trusted_Root_Certificates.pem'
client_cert = r'C:\path\to\_unencrypted_device.crt'
client_key = r'C:\path\to\_unencrypted_key.pem'
```

The main script is 
```
import variables
from MrLou_modules.Cyberark.cyberark_api import CyberArkAPI

cyberark_api = CyberArkAPI(variables)
credentials = cyberark_api.get_credentials()

if credentials:
    print(f"Username: {credentials['Username']}")
    print(f"Password: {credentials['Password']}")
    print(f"Password Change In Process: {credentials['PasswordChangeInProcess']}")

```

