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

Uploaded Python 3

File details

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

File metadata

  • Download URL: docpose-1.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 6f84d01f43e7f1e38181b08c771a951a9f8e1135060033eb1a6258a918c921b7
MD5 533b74bda534e07c1fa21d8868bc5975
BLAKE2b-256 57c792f7364936e1b21e5caf4a7c118eed3d82598f157bdcabb38488a71ffca3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: docpose-1.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 020f408ffe1e1ddf42d7a76b591dcc4dc12fd2521fc0228297ed3aaec267121a
MD5 177ef15c456582f8fb90431b5851f250
BLAKE2b-256 c652443ad452c2cb732fb0add88a7e729dc343a377f32ddea5ed5fdf065dadec

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