Skip to main content

A Python wrapper for generating a compose file

Project description


dockercomposeHelp is a python package for building complex docker-compose files quickly and without errors. It only supports Compose file version 3.


It follows a very simple usage procedure:

from dockercomposeHelp.compose import Compose
my_compose = Compose() #create a compose instance
service_db = Service('db') #create a service instance
service_db.environment({'MYSQL_ROOT_PASSWORD': 'example'})

my_compose.add_service(service_db) #add service to compose
my_compose.make_compose() #output compose

The above code snippet will produce the following yaml file:

    command: --default-authentication-plugin=mysql_native_password
      MYSQL_ROOT_PASSWORD: example
    image: mysql
      - 8080:8080
    restart: always
version: '3.7'

To be added:

  • service.deploy.rollback_config
  • service.deploy.update_config
  • service.secrets
  • service.security_opt
  • service.stop_grace_period
  • service.stop_signal
  • service.sysctls
  • service.tmpfs
  • service.ulimits
  • service.userns_mode


  • service.links -- LEGACY FEATURE

Project details

Download files

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

Files for dockercomposeHelp, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size dockercomposeHelp-1.0.0-py3-none-any.whl (8.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dockercomposeHelp-1.0.0.tar.gz (7.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page