Other
Internal libraries
paasify.engines
Paasify Engine management
This class helps to deal with docker engine versions
EngineCompose
Bases: NodeMap
, PaasifyObj
Generic docker-engine compose API
Source code in paasify/engines.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
|
assemble(compose_files, env_file=None, env=None)
Generate docker-compose file
Source code in paasify/engines.py
down(**kwargs)
Stop containers
Source code in paasify/engines.py
logs(follow=False)
Return container logs
Source code in paasify/engines.py
node_hook_children()
Create stack context on start
Source code in paasify/engines.py
node_hook_init()
ps()
Return container processes
Source code in paasify/engines.py
require_compose_file()
Raise an exception when compose file is absent
Source code in paasify/engines.py
require_stack()
run(cli_args=None, command=None, logger=None, **kwargs)
Wrapper to execute commands
Source code in paasify/engines.py
EngineComposeV1
Bases: EngineCompose
Docker-engine: Support for version until 1.29
Source code in paasify/engines.py
EngineComposeV2
EngineCompose_16
EngineDetect
Class helper to retrieve the appropriate docker-engine class
Source code in paasify/engines.py
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
|
detect(engine=None)
Return the Engine class that match engine string
Source code in paasify/engines.py
detect_docker_compose()
Detect current version of docker compose. Return a docker-engine class.
Source code in paasify/engines.py
bin2utf8(obj)
Transform sh output bin to utf-8
Source code in paasify/engines.py
paasify.sources
Paasify Source management libray
Source
Bases: NodeMap
, PaasifyObj
A Source instance
Source code in paasify/sources.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
|
cmd_install()
Install from remote
Source code in paasify/sources.py
cmd_update()
Update from remote
Source code in paasify/sources.py
extract_short(short)
Guess data from source short forms
Source code in paasify/sources.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
is_git()
is_installed()
node_hook_final()
Init source correctly from available elements
Source code in paasify/sources.py
node_hook_init(**kwargs)
SourcesManager
Bases: NodeList
, PaasifyObj
Source manager
Source code in paasify/sources.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
|
cmd_install()
cmd_ls(explain=False)
List all stacks names
Source code in paasify/sources.py
cmd_tree()
cmd_update()
find_by_name_alias(string, name=None, alias=None)
Return all src that match name or alias
Source code in paasify/sources.py
get_all()
get_app_source(app_name, source=None)
Return the source of an app_name
Source code in paasify/sources.py
get_search_paths()
list_all_names()
node_hook_final()
Prepare sources
Source code in paasify/sources.py
Common libraries
paasify.common
Paasify common library
Holds common pieces of code
OutputFormat
SchemaTarget
StringTemplate
Bases: Template
String Template class override to support version of python below 3.11
Source code: Source: https://github.com/python/cpython/commit/dce642f24418c58e67fa31a686575c980c31dd37
Source code in paasify/common.py
get_identifiers()
Returns a list of the valid identifiers in the template, in the order they first appear, ignoring any invalid identifiers.
Source code in paasify/common.py
is_valid()
Returns false if the template has invalid placeholders that will cause
:meth:substitute
to raise :exc:ValueError
.
Source code in paasify/common.py
cast_docker_compose(var)
Convert any types to strings
Source code in paasify/common.py
ensure_dir_exists(path)
ensure_parent_dir_exists(path)
filter_existing_files(root_path, candidates)
Return only existing files
find_file_up(names, paths)
Find every files names in names list in every listed paths
Source code in paasify/common.py
get_paasify_pkg_dir()
Return the dir where the actual paasify source code lives
list_parent_dirs(path)
Return a list of the parents paths path treated as strings, must be absolute path
merge_env_vars(obj)
Transform all keys of a dict starting by _ to their equivalent wihtout _
Source code in paasify/common.py
to_bool(string)
uniq(seq)
update_dict(dict1, dict2, strict=False)
Update dict1 keys with null value from dict2
Source code in paasify/common.py
paasify.framework
Paasify Framework Libary
FileLookup
Bases: PaasifyObj
A FileLookup Object
Useful for identifing available files in differents hierachies
Source code in paasify/framework.py
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
|
append(path, pattern, **kwargs)
get_lookups()
insert(path, pattern, **kwargs)
lookup_candidates()
List all available candidates of files for given folders, low level
Source code in paasify/framework.py
match(fail_on_missing=False, first=False)
Match all candidates, and built a list result with object inside
Source code in paasify/framework.py
paths(first=False)
All matched files
Source code in paasify/framework.py
FileReference
A FileReference Object
Useful for managing project paths
The path, once created is immutable, you choose how it behave one time and done forever. They act a immutable local variable.
path: The path you want to manage root: The root of your project, CWD else
Returned path will be returned as absolute
True: Return default path from origin abs/rel False: Return default path from root_path abs/rel
Source code in paasify/framework.py
is_abs()
is_root_abs()
path(start=None)
Return the absolute or relative path from root depending if root is absolute or not
Source code in paasify/framework.py
path_abs(start=None)
Return the absolute path from root
Source code in paasify/framework.py
path_rel(start=None)
Return the relative path from root
Source code in paasify/framework.py
PaasifyConfigVar
Bases: NodeMap
, PaasifyObj
Simple Paaisfy Configuration Var Dict
Source code in paasify/framework.py
PaasifyConfigVars
Bases: NodeList
, PaasifyObj
Paasify Project configuration object
Source code in paasify/framework.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
|
get_vars(current=None)
get_vars_list(current=None)
Parse vars and interpolate strings
PaasifyObj
Bases: Base
, MixInLog
Default Paasify base object
Source code in paasify/framework.py
PaasifySimpleDict
PaasifySource
Bases: NodeDict
, PaasifyObj
Paasify source configuration
Source code in paasify/framework.py
install(update=False)
Install a source if not updated
Source code in paasify/framework.py
PaasifySources
paasify.errors
Paasify errors
BuildStackFirstError
Bases: PaasifyError
Raised when a trying to interact with stack but docker-compose.yml is missing
Source code in paasify/errors.py
ConfigBackendError
DockerBuildConfig
DockerCommandFailed
DockerUnsupportedVersion
DuplicateSourceName
InvalidConfig
InvalidSourceConfig
Bases: PaasifyError
Raised when a source is not configured properly
Source code in paasify/errors.py
JsonnetBuildFailed
JsonnetProcessError
MissingApp
MissingFile
MissingTag
OnlyOneStackAllowed
Bases: PaasifyError
Raised when trying to apply command one more than one stack
Source code in paasify/errors.py
PaasifyError
Bases: Exception
Base class for other exceptions
Source code in paasify/errors.py
PaasifyNestedProject
Bases: PaasifyError
Raised when a project is created into an existing project
Source code in paasify/errors.py
ProjectInvalidConfig
ProjectNotFound
ShellCommandFailed
StackMissingDockerComposeFile
Bases: PaasifyError
Raised when a stack can't find a docker-compose.yml
Source code in paasify/errors.py
StackMissingOrigin
StackNotFound
UndeclaredVariable
Bases: PaasifyError
Raised when a a variable is called but not defined