Saravanan666/pypi-org huggingface dataset:
Package: compose_format
compose_formatFormats docker-compose files by using the distilled docker compose best
practices.Docker Compose Files are complexDocker Compose Files could be rather complex. If these files are
complex, there are multiple ways to write the same thing. If there are
multiple ways to format these files, these multiple ways will be used.
Means that it will be not possible to diff your files, cause everybody
writes them a bit different.Alphabetical order vs. custom orderSorting would be easy, if everything could be sorted alphabetically. But
in compose files the first thing mentioned for a service is theimage.compose_formataims to distill these compose format best
practices into a tool.CommentsUsually formatting tools destroy comments. But comments contain
valueable TODO-markers or other hints.compose_formatputted effort
into supporting comments.SupportNote that this small utility is just valid until docker-compose has
itself a format functionality. Currently docker-compose just support the
“config” switch. Which joins multiple compose files and print them in a
machine-readable form.UsageVia PythonInstall it via:pip3 install compose_formatAfter that use it likecompose_formatcompose-format.ymlthis will print the formatted
compose file to stdout. To let it replace the compose file add--replace.Via DockerUse it like:catdocker-compose.yml| docker run-ifunkwerk/compose_formatFeaturesSupport for Version 3, 2.1, 2, and 1.Support for CommentsOrders Services, Volumes, NetworksOrders DefinitionsOrders Port and Volume ListsContributionFeel free to add issues or provide Pull Requests. Especially when the
order in some points violates the best practices. This tool should be
changed based on the evolving best practices.
Package: compose-func
ImportantIf you prefer to write Python code in a more functional style you may find thetoolzpackage to be more useful, it includes acomposefunction as well as
several functions conducive to writing functional code in Python.No magic operators or special objects just a function with unit tests. Here is a
wonderfully contrived example to whet your appetite:>>>importjson>>>fromcomposeimportcompose>>>fromoperatorimportitemgetter>>>compose((3).__mul__,next,iter,itemgetter('b'),json.loads)('{"a": 1, "b": [2, 3]}')6ContributeSeehttp://github.com/jonathanj/composefor development.Installation$pipinstallcompose-func
Package: compose-me
compose-meCompose-me is a tool inspired byHelmto create templates for docker-compose projects. It is particularly useful
for relatively complex applications that requires some customization. Compose-me allows you to create a template
project that can be configured using a small subset of well-defined values.📖 View thedocumentation.InstallationInstall compose-me from PyPI:$ pipx install compose-meCompose-me requires Python 3.10 or newer.
Package: compose-monitor
compose-monitorDescriptionThis utility is designed for monitoring and updating of the services in the specified docker-compose.yml file.Installationpython setup.py installorpip install-e.orpip installcompose-monitorHow to useRun it with the directory withdocker-compose.ymlfile path:compose-monitor-c.Also checkout list ofargumentsarguments-c,--config- Run with config-o,--options- Additional options for the project-l,--log- Redirect logging to file--no-recreate- Don’t recreate containers, only pull new images--no-deps- Don’t restart service dependencies--affect-only-running- Make update operations only with fully running services
Package: compose-monkey
Docker Compose==============*(Previously known as Fig)*Compose is a tool for defining and running multi-container applications withDocker. With Compose, you define a multi-container application in a singlefile, then spin your application up in a single command which does everythingthat needs to be done to get it running.Compose is great for development environments, staging servers, and CI. We don'trecommend that you use it in production yet.Using Compose is basically a three-step process.1. Define your app's environment with a `Dockerfile` so it can bereproduced anywhere.2. Define the services that make up your app in `docker-compose.yml` sothey can be run together in an isolated environment:3. Lastly, run `docker-compose up` and Compose will start and run your entire app.A `docker-compose.yml` looks like this:web:build: .ports:- "5000:5000"volumes:- .:/codelinks:- redisredis:image: redisCompose has commands for managing the whole lifecycle of your application:* Start, stop and rebuild services* View the status of running services* Stream the log output of running services* Run a one-off command on a serviceInstallation and documentation------------------------------- Full documentation is available on [Docker's website](http://docs.docker.com/compose/).- If you have any questions, you can talk in real-time with other developers in the #docker-compose IRC channel on Freenode. [Click here to join using IRCCloud.](https://www.irccloud.com/invite?hostname=irc.freenode.net&channel=%23docker-compose)Contributing------------[![Build Status](http://jenkins.dockerproject.org/buildStatus/icon?job=Compose%20Master)](http://jenkins.dockerproject.org/job/Compose%20Master/)Want to help build Compose? Check out our [contributing documentation](https://github.com/docker/compose/blob/master/CONTRIBUTING.md).
Package: compose-operator
This module allows adding function composition with the|operator to any function, method, class, or other callable.composeis used for the function composition.wraptis used to add the operator as transparently
and unintrusively as possible. This ensures that:The|composition operator does not interfere at
runtime with any introspection, other operators, and
(optionally) Python 3.10’s|type union operator.|-composed functions still work with signature
introspection, method binding, pickling, and so on.VersioningThis library’s version numbers follow theSemVer 2.0.0
specification.Installationpip install compose-operatorUsageBasicsImportcomposable:>>>fromcompose_operatorimportcomposableA simple inline composition:>>>stringify_as_integer=composable(int)|str>>>stringify_as_integer(12.3)'12'Naturally, the result of|on a composable
function is also composable, so you can chain it:>>>(composable(int)|str|list)(12.3)['1','2']You can also usecomposableas a decorator:>>>@composable...defmy_stringify(thing):...returnf'hello{thing}'...>>>stringify_as_integer=int|my_stringify>>>stringify_as_integer(12.3)'hello 12'composableis “sticky”composablewill stick to callable return
values, so itworks out-of-the-box with
currying, partial application, and so on:>>>importfunctools>>>importoperator>>>importtoolz>>>>>>partial=composable(functools.partial)>>>add1=partial(operator.add,1)>>>(add1|str)(2)'3'>>>curry=composable(toolz.curry)>>>add=curry(operator.add)>>>(add(2)|float)(2)4.0composablealso sticks to the results of
method binding, so if you make a composable
method, or assign a function composed with
the|operator as a method, it “just works”:>>>classAdder:...def__init__(self,value):...self._value=value......@composable...defadd(self,thing):...returnthing+self._value......add_then_stringify=add|str...>>>adder=Adder(42)>>>(adder.add|str)(8)'50'>>>adder.add_then_stringify(9)'51'Composable ClassesIf you want to decorate a class so that the class
is composable, use@composable_constructor-
that way, normal class functionality such as|fortype unionsstill works:>>>fromcompose_operatorimportcomposable_constructor>>>>>>fromdataclassesimportdataclass>>>>>>@composable_constructor...@dataclass...classMyClass:...x:int...>>>isinstance(1,int|MyClass)True>>>isinstance("hello!",int|MyClass)False>>>isinstance(MyClass(0),int|MyClass)True>>>(operator.add|MyClass)(3,2)MyClass(x=5)composabletakes precedence overcomposable_constructor, so you can
still force|to do composition
instead of type union if you need to:>>>(composable(int)|MyClass)("6")MyClass(x=6)>>>(int|composable(MyClass))("7")MyClass(x=7)Composable Callable ObjectsIf you are defining a class with a__call__method,
you can make its instances automaticallycomposableby usingcomposable_instances:>>>fromcompose_operatorimportcomposable_instances>>>>>>@composable_instances...classGreeter:...def__init__(self,target):...self._target=target...def__call__(self):...returnf"Hello,{self._target}!"...>>>world_greeter=Greeter("world")>>>world_greeter()'Hello, world!'>>>(world_greeter|list)()['H','e','l','l','o',',',' ','w','o','r','l','d','!']
Package: compose-paas
compose-paasDeploy to multiple container platforms/PAAS using docker-compose filesInstallationcompose-paasis available on PyPI. You can use pip to install it$ pip installcompose-paasUsageOnce you have it installed, you can use it from the command line$compose-paas-cdocker-compose.yml-sapi-odocker-compose.dev.yml-ftrue-psingularitycompose-paas supports five arguments:-cor--config: The name of the base compose file-sor--service: The name of the service to be deployed-oor--override: The name of the compose file which overrides the base file-for--forcepull: Flag to enforce image pull (overrides the configuration in the compose file)-por--platform: Platform to deploy to (currently, only singularity and marathon are supported)Note: You would usedocker-composewith the above mentioned files as given below:docker-compose-fdocker-compose.yml-fdocker-compose.dev.ymlupOptionscompose-paasuses thex-compose-paasextension field in the docker-compose file
to read platform-specific as well as other general options. The following example
contains all the supported options:x-compose-paas:resources:cpus:'0.1'memory:'1024'singularity:admin_email:'admin@mail.com'endpoint:'http://prd.net/singularity/api'slave_placement:''cron_schedule:''marathon:endpoint:'http://prd.net/marathon/v2'fetch:uri:'file:///etc/docker.tar.gz'resource_roles:-'*'id:'/service/name'docker:params:entrypoint:'run_web_api.sh'ulimit:'nofile=10240:10240'forcepull:'false'ReferencesSingularityDeployRequestMarathon Configuration ReferenceHistory0.1.0 (2018-02-22)First release on PyPI.0.1.1 (2018-02-23)Include resources in labels0.1.2 (2018-02-26)Change labels format0.1.3 (2018-03-08)Add flag to enforce image pull0.1.4 (2018-04-17)Use different fields for command and arguments1.0.1 (2018-04-27)Rename package to compose-paas from singularity-composeAdd support for Marathon1.0.2 (2018-04-27)Fix setup.py (add sub-package to packages list)1.0.3 (2018-05-14)Add support for volumes mode
Package: compose-plantuml
compose_plantumlGenerate Plantuml graphs from docker-compose filesNote that version 2 as well as the legacy version is supported.UsageVia PythonInstall it via:pip3 install compose_plantumlAfter that use it like:compose_plantuml--link-graphdocker-compose.ymlVia DockerUse it like:catdocker-compose.yml| docker run-ifunkwerk/compose_plantuml--link-graphFor SVG Output, just call:catdocker-compose.yml| docker run-ifunkwerk/compose_plantuml--link-graph| docker run-ithink/plantuml > output.svgFor PNG Output, just call:catdocker-compose.yml| docker run-ifunkwerk/compose_plantuml--link-graph| docker run-ithink/plantuml-tpng> output.pngLink GraphLink Graphs provide an overview over docker-compose services.Consider the following docker-compose.ymlversion: '2'
services:
  first:
    links:
      - second
  second: {}When calling ‘compose_plantuml docker-compose.yml’ it will generate the
following link graph:[first]
[second]
[first] --> [second]Rendered it looks like:BoundariesBoundaries visualize the external boundaries a system has.Consider the following docker-compose.ymlversion: '2'
services:
  service:
    ports:
      - 8080:80When calling ‘compose_plantuml –boundaries docker-compose.yml’ it will
generate the following plantuml:rectangle system {
  [service]
}
[service] --> 8080 : 80Rendered it looks like:Related Linksdraw composehttps://github.com/Alexis-benoist/draw-composegenerates dot graphs from docker-compose filescurrently just supports docker-compose version 1does not read from stdin, so is not easy useable as docker
container
Package: compose-py
compose-pyA Python library for parsing and loadingComposefilesInstallationpipinstallcompose-pyBy default, the library doesn't have any dependencies for dataclass libraries.
Choose 'pydantic' or 'dataclasses' and install the library.
We also provideextrasfor the libraries:# If you prefer Pydantic modelspipinstall"compose-py[pydantic]"# If you prefer dataclasses modelspipinstall"compose-py[dataclasses]"Tutorial: Load, modify, and save docker-compose.ymlPydantic.BaseModel (default)importcompose_pywithopen("docker-compose.yml","r")asf:obj=compose_py.load_yaml(f)print(obj)# Prints 'compose_py.models_pydantic.ComposeSpecification(...)'print(obj.services["web"])# Prints 'compose_py.models_pydantic.Service(...)'# Copy and modify the existing service, then add it to the specificationweb2=obj.services["web"].copy()web2.command="--port 8081"obj.services["web2"]=web2print(compose_py.dump_yaml_str(obj))withopen("docker-compose-modified.yml","w")asf:compose_py.dump_yaml(obj,f)You can find more APIs undercompose_py.models_pydanticpackage.dataclasses.dataclassimportcompose_pywithopen("docker-compose.yml","r")asf:obj=compose_py.load_yaml(f,model=compose_py.ModelType.DATACLASSES)print(obj)# Prints 'compose_py.models_dataclasses.ComposeSpecification(...)'print(obj.services["web"])# Prints 'compose_py.models_dataclasses.Service(...)'# Copy and modify the existing service, then add it to the specificationweb2=obj.services["web"].copy()web2.command="--port 8081"obj.services["web2"]=web2print(compose_py.dump_yaml_str(obj))withopen("docker-compose-modified.yml","w")asf:compose_py.dump_yaml(obj,f,model=compose_py.ModelType.DATACLASSES)You can find more APIs undercompose_py.models_dataclassespackage.ExamplesSeeexamples/directory to find examples.
Package: composerisation
composerisationA CLI tool used to convert between docker-compose to normal Docker CLI commands.Warning: This project is still in beta.DemoInstead of dowloading the tool you can use thedemo website. Simply paste
yourdocker-compose.ymlfile and press convert then copy the contents from the second input box.Warning: The website is only for demo purposes, the code isn’t particularly clean. This is not a web service but a CLI toolUsagepipinstallcomposerisationcomposerisation--helpUsage: composerisation [OPTIONS]Converts docker-compose files to Docker comamnds.Options:-i,--input-fileTEXTPath to file to convert from docker-compose
to Docker.  [required]-l,--log-level[DEBUG|INFO|ERROR|CRITICAL]
Log level for the script.--helpShow this message and exit$composerisation-idocker-compose.ymlDockerYou can also use the docker image to convert between docker-compose and Docker cli.dockerrun-v${PWD}/tests/data/1.yml:/app/docker-compose.ymlcomposerisationSupported CommandWe support all commands specified in the docker-composereference file version 3.8 here.
Besides from the config options defined below.ServicesUnsupported config options:configscredential_specdepends_ondeployexternal_linkshealthchecksecretsvolume (long syntax)NetworksUnsupported config options:enable_ipv6Future FeaturesConvert between Docker cli commands to docker-composeAdddocker pull, when using imagesChangelogYou can find thechangelog here.Appendixdocker-compose example taken fromhereEditable code area fromwalesWebsite inspired byAPI Platform <https://api-platform.com/>_.
Package: composer-notebook
Composer PrototypeComposer Interactive UImake sure you have in your root dir:feeds.yaml # to store generated feeds
profile.yaml # to store an example user profileData Generationmake sure you have in your root dir:composer-finetune.jsonl
composer-dataset.jsonl
composer-dataset-methods.jsonlGenerate synthetic dataset:python -m examples.composer.scripts.synt_dataset_generatepython -m examples.composer.scripts.method_dataset_generateFinetuningpython -m examples.composer.scripts.finetuneTODO:support finetuning existing model instead of creating new fintune tasks on new modelimprove dataset gen and finetuning tasksUpload Package on Pypifrom root of composer:python setup.py sdist bdist_wheeltwine upload dist/*
Package: composer-version-manager
Composer Version ManagerComposer 2is here. It's time for a one stop shop for switching between major (and minor
👶) composer versions. Erase "using the right composer version" from your workflow.But wait, what aboutcomposer self-update --1and--2?Well I'm glad you've asked!There are some added benefits this CLI and shell hook will bring to you:Cachedcomposer.pharfor faster version toggling.Per-directory smart composer environments. It's as simple ascd my-projectand the right composer version will be used.InstallationChoose one of the options below to install cvm.Homebrew (MacOS)brewupdate
brewinstallcomposer-version-manager/cvm/cvmNote:Watch for symlink errors. If you already have an existingPython3installation you may be required to run the following command:brewlink--overwritecvmChocolatey (Windows)TODODownload binary and update PATHTODOHook onto your shellHooking onto your shell enables cvmSmart usagefor per-directory automated composer verrsioning.Find the instructions for your shell below. If your shell is not listed please feel free tosubmit a feature requestissue and we will try and make it happen.BASHAdd the following line to the end of your~/.bashrceval"$(cvmhookbash)"ZSHAdd the following line to the end of your~/.zshrceval"$(cvmhookzsh)"Smart usageCreate a.cvm_configin any directory specifying the composer version you would like to use. Navigating to that directory or any nested directory will automatically enable that composer version in your current workspace.cdmy-projectecho'2.0.11'>.cvm_configThis file can be committed to your source control.Global composer versionYou can configure a global composer version. Which will be the default when no parent directory has a.cvm_config.cvm list        # List available tags
cvm use 2.0.11  # Globally use a specific composer versionAuthorsMorgan WowkMorgan is a Software Developer from the wintery lands of Canada 🇨🇦🍁. You can primarily find him onLinkedIn, writing open source or building apps to helptens of thousands of ecommerce stores.Bhavek BudhiaLikewise, Bhavek resides in the frosty country of Canada ☃️. An avid developer 👨‍💻 with fortified experience in Python that has helped us develop a clean and extendable codebase.
Package: compose-stubs
Type stubsforcompose.VersioningThis library’s version numbers follow theSemVer 2.0.0
specification.Installationpip install compose-stubsUsageLike any other typing stub package, once installed it should
“just work”. You might need to restart your type checker.LimitationsMyPy fails to match the return type of anasyncfunction to the argument type of the next function
in the type hints ofacomposeandsacompose,
leading to false errors about types not matching.
(Pyright and Pyre don’t have this problem.)Due to limitations in Python type hints, these typing stubs
only cover at most 16 arguments in a single call tocompose,acompose, orsacompose. This limit could be higher,
but the higher the limit, the slower the type-checking.
A simple workaround is to just use multiple compose calls
to build up compositions bigger than 16 functions.Due to limitations in Python type hints, there is an edge
case in the type hints forsacomposeif the return type
of one function in a composition is awaitable and the next
function accepts that awaitable (the most likely way for
this to happen is if it acceptsAny), thensacomposeactually returns an async callable, but the type inference
will think that it returns a sync callable.Requires Python 3.10 and above (composeitself remains
supported on much older versions, but the type hints needtyping.ParamSpec).
Package: compose-to-manifest
compose-to-manifestConvert Docker Compose project to Azure IoT Edge deployment manifest.RequirementsMake sure docker is running on your system before using this tool.Python version >=3.6.0.Installationpip3installcompose-to-manifestUsagecompose-to-manifest [-h] -t [file|project] -i docker_compose_file_path -o output_path [-r your_docker_container_registry_address]Examplesgitclonehttps://github.com/VSChina/compose-to-manifestcdcompose-to-manifestIn compose-to-manifest folderConvert single filecompose-to-manifest-tfile\-iexample/flask-redis/docker-compose.yml\-oexample/flask-redis/deployment.template.jsonConvert projectcompose-to-manifest-tproject\-iexample/flask-redis/docker-compose.yml\-oexample/flask-redis-edge
Package: composetools
composetoolsA library of utility functionsfor Pythonic function composition.Most utilities are focused on transforming and dealing with iterables.Installpip install composetoolsFunctionscomposeCompose functions such thatcompose(f, g)(x)is equivalent tog(f(x))pipeCompose functions such thatpipe(f, g)(x)is equivalent tof(g(x))Utilitiesunique- Yield unique items of an iterable.each- Curriedmap.keep- Curriedfilter.mask- Currieditertools.compress.drop- Currieditertools.filterfalse.sort- Curriedsorted.flat- Flatten an arbitrarily nested iterable to a desired depth.also- Call a function and return itsinput, eg.also(print)(4)will print 4 and return 4.Develop$ghrepocloneSeparateRecords/python-composetools$poetryinstall$poetryrunpython-mpytesttests.pyLicenceISC
Package: compose-to-rancher
Convert Docker Compose V2docker-compose.ymlto a Rancher compatible Docker Compose V1 file, by default indocker-compose-v1.yml.Install:pipinstallcompose-to-rancherYou would have a command:compose-to-rancherYou just have to run that command in a directory with a Docker Compose V2 filedocker-compose.ymland it will generate a Rancher compatible Docker Compose V1 filedocker-compose-v1.ymlIf you want to customize the you can see the command help:$ compose-to-rancher --help

usage: compose-to-rancher [-h] [-f FILE] [-o OUTPUT]

Convert a docker-compose.yml file version 2 to a docker-compose-v1.yml version
1, compatible with Rancher

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  the input docker-compose.yml file in version 2
                        (default: docker-compose.yml)
  -o OUTPUT, --output OUTPUT
                        the output to write a docker-compose.yml version 1
                        compatible with Rancher (default: docker-
                        compose-v1.yml)