Praetorian Fabric library extends standard `fabric` library, to maintain communication with praetorian services. Main purpose is to make necessary connections and provide suitable data.
Project description
praetorian-fabric
Gladiator Titus in your service. I like heavy weights 🏋️. More strength, more praetorian, more fabric. What more do you want? Gimme that heavy variables 💪.
Introduction
Praetorian Fabric library extends standard fabric
library, to maintain communication
with praetorian services. Main purpose is to make necessary connections and provide
suitable data.
Installation
# pip
pip install praetorian-fabric
# pipenv
pipenv install praetorian-fabric
# poetry
poetry add praetorian-fabric
Usage
####1. First you need to create environment variables:
PRAETORIAN_API_URL
PRAETORIAN_API_KEY
PRAETORIAN_API_SECRET
PRAETORIAN_USERNAME
PRAETORIAN_PASSWORD
####2. Create fabfile.py
folder in your project root directory
####3. Instantiate PraetorianConfig
object:
praetorian_config = PraetorianConfig(project_name='foo project')
####4. Create task and connect to Praetorian SSH Proxy to gain needed variables:
@task
def deploy(ctx, remote_name, environment):
ctx = praetorian_config.connect(ctx, remote_name, environment)
####5. Get variables by dot notation anywhere in your tasks:
@task
def deploy(ctx, remote_name, environment):
ctx = praetorian_config.connect(ctx, remote_name, environment)
variable = praetorian_config.get_variable('variable_name')
nested_variable = praetorian_config.get_variable('variables.nested_variable.name')
Developed with 💙 and ☕️ by Adam Žúrek with the support of BACKBONE s.r.o., 2021 (C)
0.1.0 : 2021-08-05
- 💪 Initial release
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
Hashes for praetorian_fabric-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 509e5b790588c5b84232dc13ede37b9ef95de17284047fe881cfb0eaf5807237 |
|
MD5 | 46500d46f0a08f47a969b3674b4b0189 |
|
BLAKE2b-256 | b8191b37dfb9d6e8075a180a73426c1f6c7e4d11583b64b5d55bad1065a75c81 |