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.0.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.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docpose-1.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 c511e90db05f02abdfc3f90165a5286c1c0960fd2814068293b5a3d0b28887da
MD5 aaa4477821ae65bc9db3e5e78216e049
BLAKE2b-256 a4647b19b08800ebe0ab75c16765e2c0c2f8f760d25fb84daf8590f67f1b0c52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: docpose-1.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 100871b4b7e820925ff3636307714ab70387cbc135816db415c8899139ee5a5d
MD5 50a190fb379f000f1d10bb69aec45cab
BLAKE2b-256 9bd5faf89f538f3fec26366541685ef5fbb82fa72c9b498baa8d45011f9d47bf

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