FocusPloyer
FocusPloyer is a Python module for deploying and configuring environments on remote servers using asyncssh.
Installation
You can install FocusPloyer using pip:
pip install focusployer
Usage
Here's a simple example demonstrating how to use focusployer to deploy and configure environments on a remote server:
from focusployer.deployer import connect_to_server, install_configure_environment, send_files_to_server, post_deploy_configuration
import asyncio
async def main():
REMOTE_HOST = 'your_remote_host'
REMOTE_PORT = 22
USERNAME_HOST = 'your_username'
USERNAME_PASS = 'your_password'
SCRIPTS_DIR = 'path_to_scripts_directory'
OUTPUT_DIR = 'path_to_output_directory'
INPUT_DIR = 'path_to_input_directory'
SCRIPTS_DIR_DEPLOY = 'path_to_deploy_scripts_directory'
# Connect to the server
conn = await connect_to_server(REMOTE_HOST, REMOTE_PORT, USERNAME_HOST, USERNAME_PASS)
# Install and configure environment on the remote server
await install_configure_environment(conn, SCRIPTS_DIR)
# Send files to the server
await send_files_to_server(conn, OUTPUT_DIR, INPUT_DIR)
# Post-deployment configuration
await post_deploy_configuration(conn, SCRIPTS_DIR_DEPLOY)
# Close the connection
conn.close()
asyncio.run(main())
Replace your_remote_host, your_username, your_password, path_to_scripts_directory, path_to_output_directory, path_to_input_directory, and path_to_deploy_scripts_directory with your actual values.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
focusployer-1.1.1.tar.gz
(2.8 kB
view details)
File details
Details for the file focusployer-1.1.1.tar.gz.
File metadata
- Download URL: focusployer-1.1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.0.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f230838778a8364f611d81eb1464b42441081b3d0bd2091796e94f3977ce8d72
|
|
| MD5 |
f038f703dcc5c5abe24c4388203b8065
|
|
| BLAKE2b-256 |
7154483003f239db38480af42ff758fe45afc59bd8550ec0347d6d8ed955fc4e
|