skip to navigation
skip to content

zencore-conf 2.0.9

Zencore Configuration.

Zencore Configuration

Classes

  1. Settings

Functions

  1. load_object
  2. load_params
  3. load_urls

load_object workflow

  1. import from string: target.
  2. if provides params, call target with params as new_target.
  3. if provides method, select method or method.target from new_target as new_target.
  4. if provides method.params, call new_target with method.params.
  5. and so on…

load_params workflow

  1. params is a list
  2. if provides name field, it’s a key-value parameter, and keep it in kwargs
  3. if not provides name field, it’s a positional parameter, and keep it in args
  4. return tuple (args, kwargs)

Usage

Example Configuration

services:
  - target: x1.y1.z1
  - target: x2.y2.z2
    params:
      - value: p1
      - value: p2
      - name: k3
        value: p3
      - name: k4
        value: p4
  - target: x3.y3.z3
    params:
      - value: p1
      - value: p2
      - name: k3
        value: p3
      - name: k4
        value: p4
    method: m1
  - target: x4.y4.z4
    params:
      - value: p1
      - value: p2
      - name: k3
        value: p3
      - name: k4
        value: p4
    method:
      target: m2
  - target: x5.y5.z5
    params:
      - value: p1
      - value: p2
      - name: k3
        value: p3
      - name: k4
        value: p4
    method:
      target: m3
      params:
        - value: p1
        - value: p2
        - name: k3
            value: p3
        - name: k4
            value: p4
  - target: x6.y6.z6
    params:
      - value: p1
      - value: p2
      - name: k3
        value: p3
      - name: k4
        value: p4
    method:
      target: m3
      params:
        - value: p1
        - value: p2
        - name: k3
            value: p3
        - name: k4
            value: p4
      method: m3m1
 
File Type Py Version Uploaded on Size
zencore-conf-2.0.9.tar.gz (md5) Source 2017-11-01 4KB