Saravanan666/pypi-org huggingface dataset:
Package: docker-composer-v2
Docker Composer V2A library to interact withdocker compose(Compose V2) from a python Program.
All commands and parameters are exposed as python classes and attributes
to allow for full auto-completion of its parameters with IDEs
that support it.This project is based off the open source project:https://github.com/schollm/docker-composerThe main goal for this branch-off effort is to make it work for the latest Docker Compose V2.Installpipinstalldocker-composer-v2UsageThe main class isdocker_composer_v2.DockerCompose. Its parameters are
all options fromdocker compose.Eachdocker composesubcommand has a corresponding function, e.g.DockerCompose.runorDockerCompose.scale. Their arguments again mirror
the options of the corresponding command.The resulting object has acallfunction.
It takes arbitrary strings as input, as well as all keyword arguments fromsubprocess.run, and returns asubprocess.CompletedProcessimportosfromdocker_composer_v2importDockerCompose# set log level and verboseos.environ["DOCKER_COMPOSE_LOG_LEVEL"]="info"# Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")base=DockerCompose(file="docker-compose.yml")base.run(detach=True,workdir="/tmp").call("app")base.run(workdir="/tmp").call("app","/bin/bash","-l")# /tmp $ ls /.dockerenv# /.dockerenv# /tmp $ exitprocess=base.ps(all=True).call(capture_output=True)print(str(process.stdout,encoding="utf-8"))#          Name                      Command           State    Ports# -------------------------------------------------------------------# myapp_app_70fd8b786b76   myapp --start-server        Exit 0# myapp_app_6ac3db4e1b55   myapp --client              Exit 0DevelopCoding StandardsTypePackageCommentLinterblackAlso for auto-formatted modulesLoggingloguruPackagingpoetryTestspytestTypingmypyType all methodsImportsisort
Package: docker-compose-transfer
Docker compose transferMissedsave/loadcommands for docker compose.Installationpython-mpipinstalldocker-compose-transferRequirementspython 3.5+dockerLicensedocker-compose-transferis offered under the WTFPL license.Usage$docker-compose-transfer--help
usage:docker-compose-transfer[-h][--version][--timeoutTIMEOUT][--use-service-image-name-as-filename][-fFILE]{save,load}...

positionalarguments:{save,load}optionalarguments:-h,--helpshowthishelpmessageandexit--versionshowversion--timeoutTIMEOUTdockerconnectiontimeout[default:60]--use-service-image-name-as-filenameSupportlegacynamingbehavior-fFILE,--fileFILEspecifyanalternatecomposefile
Package: docker-compose-wait
docker-compose-waitSome useful script to wait until all services declared in a docker-compose file are up and running.This script uses the health check mechanism provided since Docker 1.12. If your services have a configured health check, after making adocker-compose up -dyou can simply call this script to have it wait until all your services health statuses are fixed. If they are allhealthyit will return0if any of them isunhealthy(orDown) it will return -1.This script can be useful, as example, in Continuous Integration or other situations when you just want to wait until a stack is deployed before performing other actions.Please note this script does not do anything about dependencies startup order. See theofficial documentationfor that problem.Installationpip install docker-compose-waitThis utility requires Python 2.7 or Python >= 3.5. It also supportsdocker-composefrom version 1.10.Usageusage: docker-compose-wait.py [options]

Wait until all services in a docker-compose file are healthy. Options are
forwarded to docker-compose.

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  Specify an alternate compose file (default: docker-
                        compose.yml)
  -p PROJECT_NAME, --project-name PROJECT_NAME
                        Specify an alternate project name (default: directory
                        name)
  -w, --wait            Wait for all the processes to stabilize before exit
                        (default behavior is to exit as soon as any of the
                        processes is unhealthy)
  -t TIMEOUT, --timeout TIMEOUT
                        Max amount of time during which this command will run
                        (expressed using the same format than in docker-
                        compose.yml files, example: 5s, 10m,... ). If there is
                        a timeout this command will exit returning 1.
                        (default: wait for an infinite amount of time)Basically it can be as simple as:docker-compose-waitdocker-compose-waitbehaves like adocker-composesub-command. It will forward the usualdocker-composecommand-line arguments. The above command will work fine if you previously randocker-compose up -dby referencing the standarddocker-compose.ymlfile. If you are using other files for yourdocker-composeconfiguration just use:docker-compose-wait -f <path_to_yaml_file> -f <path_to_other_yaml_file> ...LicenseSee the license file.ContributionSee the contribution guide.
Package: docker-compose-wait-cksource
docker-compose-waitSome useful script to wait until all services declared in a docker-compose file are up and running.This script uses the health check mechanism provided since Docker 1.12. If your services have a configured health check, after making adocker-compose up -dyou can simply call this script to have it wait until all your services health statuses are fixed. If they are allhealthyit will return0if any of them isunhealthy(orDown) it will return -1.This script can be useful, as example, in Continuous Integration or other situations when you just want to wait until a stack is deployed before performing other actions.Please note this script does not do anything about dependencies startup order. See theofficial documentationfor that problem.Installationpip install docker-compose-waitThis utility requires Python 2.7 or Python >= 3.3. It also supportsdocker-composefrom version 1.10.Usageusage: docker-compose-wait.py [options]

Wait until all services in a docker-compose file are healthy. Options are
forwarded to docker-compose.

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  Specify an alternate compose file (default: docker-
                        compose.yml)
  -p PROJECT_NAME, --project-name PROJECT_NAME
                        Specify an alternate project name (default: directory
                        name)
  -w, --wait            Wait for all the processes to stabilize before exit
                        (default behavior is to exit as soon as any of the
                        processes is unhealthy)
  -t TIMEOUT, --timeout TIMEOUT
                        Max amount of time during which this command will run
                        (expressed using the same format than in docker-
                        compose.yml files, example: 5s, 10m,... ). If there is
                        a timeout this command will exit returning 1.
                        (default: wait for an infinite amount of time)
  -l, --log-print       Whether to print docker healthcheck output for
                        unhealthy servicesBasically it can be as simple as:docker-compose-waitdocker-compose-waitbehaves like adocker-composesub-command. It will forward the usualdocker-composecommand-line arguments. The above command will work fine if you previously randocker-compose up -dby referencing the standarddocker-compose.ymlfile. If you are using other files for yourdocker-composeconfiguration just use:docker-compose-wait -f <path_to_yaml_file> -f <path_to_other_yaml_file> ...Running testspython -m pip install -r requirements.txt # install dependencies
brew install bats-core # install test runner

bats tests.bats # run testsLicenseSee the license file.ContributionSee the contribution guide.
Package: docker-composition
DescriptionStill very much in alpha. But a package manager similar to that of helm but for docker-compose applications.Handles sub-applications and values.yaml files with templates similar to that used for kubernetes.yaml files.To start you need three files (see examples here:https://github.com/sam-technesci/composer/tree/main/examples):app.yamltemplate.yamlvalues.yamlThe templating language used is Jinja2 and you substitute variables from your values.yaml(s) into the template.Quick installcd examples/basic_application && composer installSee the README.md atexamples/basic_application/README.mdfor a walk-through.Defaults to using values.yaml in the same directory.To view your template before installing it you can docomposer templateor you can save a template withcomposer template > docker-compose.yamlFor more commands do:composer --helpInstallationHelper Scriptcurl-fsSLhttps://raw.githubusercontent.com/sam-technesci/composer/main/install.sh-oget-composer.sh&&sudo/bin/bashget-composer.shManualInstall python39 and pip3.
Then do:pip3 install --upgrade docker-composition.deb CreationInstallsudo apt-get install python3-stdebProject setupUsing hatch as a tool to manage package:https://hatch.pypa.io/latest/intro/hatch new compositionPublishingEnsured thepyproject.tomllooked like this:[build-system]requires=["hatchling>=1.7.0",]build-backend="hatchling.build"[project]name="docker-composition"description="Docker-compose package manager"readme="README.md"license=""authors=[{name="sam",email="sam@fake.com"},]dependencies=["humanize","petname","PyYAML","Jinja2","click"]dynamic=["version",][project.scripts]composer="composition.composer:entrypoint"[project.urls]Homepage="https://github.com/sam-technesci/composer"[tool.hatch.version]path="composition/__init__.py"[tool.hatch.build.targets.sdist]include=["/composition",]Note: remember to update__version__.pyThen run:sudo hatch build && sudo hatch publishGenerating requirementspip3 install pip-toolspip-compile requirements.in > requirements.txtTo install locallypip3 install --upgrade docker-composition
Package: docker-containers
docker_containersUsage:importtimefromx5_aio_pika_extimportRMQClientfromdocker_containersimportRabbitContainerasyncdefcheck_connect(url):rabbit_client=RMQClient(url)awaitrabbit_client.is_alive()awaitrabbit_client.close()container=RabbitContainer(check_connect)container.start()time.sleep(180)container.stop()
Package: dockercontext
Docker ContextRun containers usingwithstatement.ExampleimportunittestfromurllibimportrequestfromdockercontextimportcontainerclassContextTest(unittest.TestCase):deftest_response(self):withcontainer.Context("nginx:alpine",{"80/tcp":8080}):withrequest.urlopen("http://localhost:8080/")asresponse:self.assertEqual(response.code,200)deftest_container_id(self):withcontainer.Context("nginx:alpine",{})asctx:self.assertEqual(64,len(ctx.container_id()))self.assertEqual(0,len(ctx.container_id()),ctx.container_id())Note that although context blocks until container's state isrunningthis does not meant that service inside container is ready.Tests$ python -m unittest
Package: docker-credential-aws-sm
AboutThishelperis suitable for storing Docker registry credentials for distributed Docker installations across
AWS EC2 clouds. It stores all necessary information in JSON in single secret managed by AWS SecretsManager service.RequirementsThe only required software isboto3InstallationInstall package usingpippip install docker-credential-aws-smSetupThere are 3 steps required before you can use the helper in the cloudTo registerhelperfor current user edit$HOME/.docker.config.jsonand place configuration required configuration:{"credStore":"aws-sm"}For automatic repository discovery configuration should also contain"HttpHeaders"key:{"credStore":"aws-sm","HttpHeaders":{"User-Agent":"Docker-Client/18.09.1 (linux)"}}Export necessary environmental variables.DOCKER_SECRETSMANAGER_NAMEis mandatory,AWS_variables should be set according to needs:#(required)DOCKER_SECRETSMANAGER_NAMEpointsthesecretnameunderwhichthetoolstorescredentialsexport DOCKER_SECRETSMANAGER_NAME='my_docker_sercret'#(optional)export AWS_...Create IAM user or role according to your need.
Package: docker-credential-chamber
docker-credential-chamberAn implementation of a credential helper for 'docker login' usingchamberfor the backend storagereference:https://docs.docker.com/engine/reference/commandline/login/#credential-helpersCLIUsage: docker-credential-chamber [OPTIONS] COMMAND [ARGS]...

  docker credential helper

  This program implements the credential helper protocol defined by docker for
  use by the 'docker login' command.  It uses 'chamber' to store the secrets
  so they are never written to ~/docker/config.json. (and preventing docker's
  warning)

  reference: https://docs.docker.com/engine/reference/commandline/login/#credential-helpers

Options:
  -s, --service TEXT    chamber service name to use for credential store  [env
                        var: DOCKER_CREDENTIALS_SERVICE]
  -t, --token TEXT      vault token to use with chamber command  [env var:
                        DOCKER_CREDENTIALS_TOKEN]
  -d, --debug           show full stack trace on exceptions
  -f, --log-file FILE   log to file  [env var: DOCKER_CREDENTIALS_LOGFILE]
  -e, --log-stderr      log to stderr
  -L, --log-level TEXT  [env var: DOCKER_CREDENTIALS_LOGLEVEL]
  --help                Show this message and exit.

Commands:
  erase    protocol command
  get      protocol command
  install  configure this credental helper in ~/.docker/config.json
  list     protocol command (undocumented)
  store    protocol command
Package: dockerctl
dockerctlPython Script to steer docker-compose-yaml's from everywhere.https://pypi.org/project/dockerctl/Installation:Installation from PyPi:pip install dockerctlManual installation: Typepip install .in the project's directoryBe aware that you have to call python3 pip, so if you're on an distro that defaults to py2, usepython3 -m pipThis program is released under the GPLv3. See "LICENSE" for further information.This program is going to have the first release soon, please report bugs and propose enhancements.usage: dockerctl [-h] [-v] [-l] [--list] [--path PATH] COMMAND COMPOSE_NAME [extra ARGS passed to docker-compose]
                 start: Start the composition
                 stop: Stop the composition
                 restart: Restart it.
                 ps: Show processes of services in composition.
                 up: Calls docker-compose up -d, composition runs as daemon afterwards.
                 kill: Kill the whole composition, if you don't pass extra args.
                 rm: Removes all volumes created by the compose yaml.
                 top: Get information about the processes in the services.
                 logs: Get the logs of the whole composition. Pass -f to get ongoing information.
                 images: Shows images used by the services in the composition.
                 port: Shows the port used and mapped by the composition.
                 pull: Pull images needed by the composition.
                 push: Push built images of the composition.
                 pause: Pause all services in the composition.
                 unpause: Unpause them.
                 add: Links the current dir to a folder with the compose_name under /etc/docker. Use [--path] to link an other path than curdir.
                 remove: Removes composition folder or link under /etc/docker
                 exec: Exec something in a service of a container. [ARGS] can optionally be used to write the command.
                 edit: Edit the docker-compose.yml. Uses the EDITOR env var.
                 show: Shows the docker-compose.yml in less.
                 create: Create dir with compos_name under /etc/docker
                 update: Runs pull and up in one command to update a composition.
Package: dockerctx
dockerctxis a context manager for managing the lifetime of a docker container.The main use case is for setting up scaffolding for running tests, where you want
something a little broader thanunit tests, but less heavily integrated than,
say, what you might write usingRobot framework.Install$pipinstalldockerctxFor dev, you have to useflit:$pipinstallflit$flitinstallThe development-specific requirements will be installed automatically.DemoThis is taken from one of the tests:importtimeimportredisimportpytestfromdockerctximportnew_container# First make a pytest fixture@pytest.fixture(scope='function')deff_redis():# This is the new thing! It's pretty clear.  The `ready_test` provides# a way to customize what "ready" means for each container. Here,# we simply pause for a bit.withnew_container(image_name='redis:latest',ports={'6379/tcp':56379},ready_test=lambda:time.sleep(0.5)orTrue)ascontainer:yieldcontainer# Here is the test.  Since the fixture is at the "function" level, a fully# new Redis container will be created for each test that uses this fixture.# After the test completes, the container will be removed.deftest_redis_a(f_redis):# The container object comes from the `docker` python package. Here we# access only the "name" attribute, but there are many others.print('Container%s'%f_redis.name)r=redis.StrictRedis(host='localhost',port=56379,db=0)r.set('foo','bar')assertr.get('foo')==b'bar'Note that a brand new Redis container is created here, used within the
context of the context manager (which is wrapped into apytestfixture
here), and then the container is destroyed after the context manager
exits.In the src, there is another, much more elaborate test whichruns apostgrescontainer;waits for postgres to begin accepting connections;creates a database;creates tables (using theSQLAlchemyORM);performs database operations;tears down and removes the container afterwards.
Package: dockerd
dockerd library spawns your own Docker daemon as a subprocess, lets you run some docker commands, and then kills the daemon when you don't need it anymore.It works perfectly inside privileged docker containers (achieving docker-in-docker in a faster and more self-contained way than official tutorials)## Example code```python#!/bin/env python3from dockerd import Docker, CalledProcessErrorimport syswith Docker() as docker:try:docker.pull('lew21/dockerd')except CalledProcessError:passtry:docker.build('.', cache_from='lew21/dockerd', pull=True, tag='dockerd')docker.tag('dockerd', 'lew21/dockerd')docker.push('lew21/dockerd')except CalledProcessError as e:sys.exit(e.returncode)```
Package: docker-deployer
Docker Deployer is aFabricframework forDocker Composeapplications deployment.WhileDocker Composeis a tool for defining and running complex applications with Docker,
Docker Deployer provides a basic suite of tasks for deploying such applications in various environment
such as CI servers, staging servers, production servers, etc.InstallationTo use Docker Deployer you needFabricpip install fabric
pip install docker-deployerYou are done !ContributingFork it (https://github.com/barraq/docker-deployer.git)
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am ‘Add some feature’)
Push to the branch (git push origin my-new-feature)
Create new Pull Request
Package: docker-develop
Docker-DevelopDocker-Develop is a versatile utility tool designed to simplify the management of Docker Compose configurations and make your container orchestration tasks smoother than ever. It empowers you to effortlessly work with distributeddocker-compose.ymlfiles scattered across multiple repositories and directories, providing a unified and efficient approach to containerized development.Key FeaturesParameterized Docker Compose: Docker-Develop streamlines the usage ofdocker-compose, ensuring the right parameters are applied based on your selections.Dependency Management: Define dependencies between configurations, enabling you to control the order in whichdocker-compose.ymlfiles are passed to Docker Compose.Environment Variable Overrides: Customize your configurations by overriding environment variables through dependencies.Docker Compose Profiles: Seamlessly work with Docker Compose profiles to meet your specific development needs.Secrets Vault: Built-in support for securely storing sensitive information, such as environment variables, certificates, and more. All securely managed as password-protected zip files.Getting StartedDocker-Develop offers a wide range of commands to help you manage your Docker Compose configurations effectively. Here are some of the core commands to get you started:init: Initialize a Docker-Develop configuration.vault: Manage your vault of secrets.list: Display detected configurations.select: Choose a configuration to enable, disable, or reset.services: List Docker Compose services and profiles.each: Run a command in each configuration directory.compose: Work with Docker Compose configurations.status: Get the status of Docker Compose services.logs: View the logs of Docker Compose services.up: Start your Docker Compose environment.down: Shut down your Docker Compose environment.build: Build a Docker Compose service.rebuild: Build and start a Docker Compose service.restart: Restart a Docker Compose service.Installationpipinstalldocker-developBy leveraging Docker-Develop, you can streamline your Docker Compose development workflows and make the most out of your containerized applications. Give it a try and experience a more efficient and organized approach to container orchestration.Check the documentation for detailed usage instructions and examples.View on GitHub
Package: docker-dev-python
# Python Development Plugin fordocker-devThis plugin makes it easy to use Docker while developing your Python projects.In development, it’s quite likely that you want to achieve the following:Install your Python distribution in editable mode (e.g.,pip install -e .).Mount your distribution as read-only on the container, so that you get
instant code reload.However, those two things conflict, as the container can’t write to the
read-only file system. You could drop this constraint and allow the container
to write to the directory, but this.egg-infodirectory wouldn’t be owned
by you, which will lead to other problems.This plugin is a workaround to this issue: It generates the.egg-infoin the
host system, even before the image is built.To learn more, read about [docker-dev](https://github.com/2degrees/docker-dev).