A package with multiple little scripts that i keep re-using
Project description
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:
- Import the necessary function:
from MrLou_modules.Random_Message.random_message import get_random_message
- 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 = "" 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']}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file MrLou_modules-0.2.1.tar.gz
.
File metadata
- Download URL: MrLou_modules-0.2.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be2997a6f56e4c82f3f5172d14df25208386dd089edbf390c00df077884fc982 |
|
MD5 | bd73602f3f350ff3334f22f2388998a2 |
|
BLAKE2b-256 | 7b26fdaf7cdbdd40ab0fd33a533e58fcee38b0feba3c092811faf2cc20c9e8fd |
File details
Details for the file MrLou_modules-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: MrLou_modules-0.2.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2deb9f00de92f7d5ebbdacb099bda325893a60c59248dac354417c5c27aab31b |
|
MD5 | e230e4715f0c476bfeb21f3f41bd7efc |
|
BLAKE2b-256 | 47dca08f3418cd613d37ea9b7cbe91bce388e711663e021a7ce013147b12df75 |