Skip to main content

A small templating engine using a .docpose.yml file for generating documents

Project description

DOCPOSE

A templating engine build on top of python and jinja2.

By executing docpose -i a sample config.yml will be generated. This config.yml might look similar to this:

source:
  template_dir: .templates
  outputs:
    - compose.yml
    - &DATABASES databases.yml
  env_files:
    - env/.env
    - env/.env.local
  environment:
    - NODE_ENV: local
    - TARGET: local

compose:
  - &APP my_app.j2
  - template: web_ui.j2
    depends_on:
      - *APP
  - template: &POSTGRES postgresql.j2
    depends_on:
      - *APP
    environment:
      - PASSWORD: super_secret
      - USERNAME: super_admin 
  - template: mongodb.j2
    environment:
      - SOME_STR: VAR_ONE
      - SOME_BOOL: false
      - SOME_NUM: 1234
    output: *DATABASES
    depends_on:
      - *APP
  - redis.j2
  - volumes.j2
  - networks.j2

command: docker compose

With docpose -c config.yml the files which are declared under outputs will be generated, with the first one as the default file. This means that if in the compose section a template has no output defined, it will automatically go into the file which is in first place under outputs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docpose-1.1.2.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docpose-1.1.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file docpose-1.1.2.tar.gz.

File metadata

  • Download URL: docpose-1.1.2.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/5.15.146.1-microsoft-standard-WSL2

File hashes

Hashes for docpose-1.1.2.tar.gz
Algorithm Hash digest
SHA256 352d2820b856ea3e1c222aab5c3932dc96496ef8f4aef52c9e26c1f380c74964
MD5 59d32b30d9d980dcdadd28878c1a6db9
BLAKE2b-256 3fc8a1611dc56ecd1fcfb2d00c9b324bf48a2212cbfaad44d58b289be3d33a09

See more details on using hashes here.

File details

Details for the file docpose-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: docpose-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/5.15.146.1-microsoft-standard-WSL2

File hashes

Hashes for docpose-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 71e1b69d2d0cd752ecfc65efc537f774ff446fa114a3595ad53a37e8fab5b8d7
MD5 257171b14246e49b83aef6fe153c36b6
BLAKE2b-256 3d2047accf55d7641559981ebbc82c631fc3ee54e4773c0887fddda30bf664b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page