Saravanan666/pypi-org huggingface dataset:
Package: yaml2pyclass-mecher
yaml2pyclass Code GeneratorThis package enables you to easily generate and instantiate dataclasses from an inputYAMLfile. For example
thisYAMLfileimage_size:[1280,960]cluster_config:eps:0.02min_num_samples:10path_output:"./output"automatically converts to a Pythonclassimportdataclassesimportyaml2pyclassclassConfig(yaml2pyclass.CodeGenerator):@dataclasses.dataclassclassClusterConfigClass:eps:floatmin_num_samples:intimage_size:listcluster_config:ClusterConfigClasspath_output:strIn addition to code creation, an instance of the generated class that is initialized with theYAMLs values can be
created automatically.The use case it was primarily developed for is facilitating code completion for arbitraryYAMLconfig files.
UsingYAMLfiles as input config allows flexible and general information passing, however, when
usingpyyamlthe
information is saved as adictwhich does not support any automatic code completion. This means, that you need to know
the exact variable names for access.Using this package you can enjoyYAMLs flexibility and generality, while additionally providing the benefit of code
completion and type specific suggestions from your IDE. Thus, no need to memorize exact variable names or types.InstallationYou can install the package usingpippipinstallyaml2pyclassUsageFile UpdateTo update an existing file, as e.g. in the case of a config file, you need to create a base file. The base file (e.g.
atpath/to/config.py) should simply contain a class, that inherits from theyaml2pyclassbase classCodeGenerator:importyaml2pyclassclassConfig(yaml2pyclass.CodeGenerator):# content is updated automatically from the specified YAML filepassThen, in the function where you want to use this class based on theYAMLinput, import the created class and call
thefrom_yamlfunctionfrompath.to.configimportConfig# import the class Config from the path/to/config.py fileconfig=Config.from_yaml("config.yaml")This will update the file of theConfigclass with dataclass that matches the inputYAML.ContributorsThis project is a collaboration withFelix Hertlein.LicenseThis code is distributed under the 3-Clause BSD License, seeLICENSE.
Package: yaml2resume
yaml2resumeyaml2resume is a simple python app that takes a resume in a YAML formatted file and then renders it using jinja2 templates. The primary use-case is for engineers, managers or other technical users who have diverse skillsets, but might be want to provide a targeted resume for a specific job post, highlighting specific skills or relevant work experience.By default, an HTML (suitable for exporting to PDF) and TXT template (for copying and pasting text) are provided. yaml2resume is also designed to be used in conjunction with a version control system such as git, to provide version tracking.A sample use case might be a software engineer looking to move to a devops engineer role. Using yaml2resume the user can define skills and bucket them by category (such aspython.yaml,kubernetes.yaml,scrum_master.yaml,aws.yaml,security.yaml,blogging.yaml), then generate a resume that is tailored to each role.Things to noteKeep in mind when using the generate function that the first yaml file will appear first in your output. For example if you invoke yaml2resume by usingyaml2resume base.yaml technical.yaml, the contents ofbase.yamlwill appear first, which might not be what you want. Be aware that using shell globbing, sometimes the order will not be what you are looking for.Installationpip3installyaml2resumeUsagecd~/vcs/resume# Initialize the resumeyaml2resumeinit# Generate the resume, outputting to the output directory (defined in config.yaml)yaml2resumegenerate*.yaml# Spell check/verify yaml files are all in good working orderyaml2resumecheckCustomizing your resumeOnce you have initialized your resume, note the config.yaml. This file is commented fairly well, but there are a couple key configuration options to keep in mind:Field NameDescriptionoutput_dirThis is the directory that the resume templates are outputted to (defaults tooutput)resume_nameThis is the default resume name that is used (defaults toresume)file_formatThis is a jinja formatted output for the resume, including the extension of the templatestatic_dirThe static directory gets copied over to each resume generatedtemplate_dirWhere yaml2resume will look for templates (in current working directory)include_alwaysThese resume yaml files will always be included, useful for things like certs or generic info like phone/namespellcheck_dictionaryA list of words to be added to the spellchecking dictionaryspellcheck_ignore_fieldsAny fields to ignore spellchecking onOrganizing your resumeSince the yaml files can be pulled in by globs, you can organize using buckets and globs.For example, if you have a list of files like:01_devops_kube.yaml02_devops_monitoring.yaml03_devops_security.yamlYou could then use something likeyaml2resume *devops*.yamland pull in all the relevant resume items.
Package: yaml2rst
Author:Hartmut Goebel <h.goebel@crazy-compilers.com>Copyright:2015-2019 by Hartmut GoebelLicence:GNU General Public Licence v3 or later (GPLv3+)This tool allows you writing documentation directly into YAML-files as
comments. These comments will then be converted to text and the YAML-code
goes into literal blocks.This is some kind ofliterate programming, except that you do not
write code into your text, but text into your code. This difference
allows to process the YAML file directly without any pre-processing.Usage:yaml2rst [-h] [--strip-regex regex] infile outfile

positional arguments:
  infile               YAML-file to read (`-` for stdin)
  outfile              rst-file to write (`-` for stdout)

optional arguments:
  -h, --help           show this help message and exit
  --strip-regex regex  Regex which will remove everything it matches. Can be
                       used to remove fold markers from headings for example.
                       Example to strip out [[[,]]] fold markers:
                       '\s*(:?\[{3}|\]{3})\d?$'. Check the README for more
                       details.How it worksThis script takes all lines beginning with#(and lines
consisting of only a#) as text-lines. Everything else will be
treated as “code”. The text-lines will get the#removed
and the “code” will get spaces prepended.Additionally at the start and at the end of a “code”-block, lines are
added as required by reStructuredText. Also at the begin of a
“code”-block, a::is added if required.--strip-regexcan be used to remove matching characters from text-lines
when needed. Refer to documentation aboutFolding marks supportfor details.ExamplesYou can find example yaml-input, rst-output and generated html in the
examples directory. You may also view the generated html online athttps://rawgit.com/debops/yaml2rst/develop/examples/main.html.Related Toolsyaml4rstis a
linting/checking/reformatting tool for YAML files documented with
inline RST which goes hand in hand with yaml2rst.Maintainersyaml2rstwas originally developed 2015 and maintained by Hartmut
Goebel. In 2019 the project moved to thedebopsproject for whichyaml2rstwas developed.
Package: yaml2sbml
Table of contentsAboutInstallationGetting StartedBasic SyntaxHow to citeContactAboutyaml2sbmlis a small package in Python to convert an ODE model specified in a YAML file intoSBMLfor ODE simulation and intoPEtabfor parameter fitting.yaml2sbmloffers:a translator of ODE models specified in YAML into SBML/PEtab via a Python and a command-line interface;a format validator for the input YAML; anda model editor, which provides a simplified interface to generate, import and export YAML models.Installationyaml2sbmlcan be installed from PyPI withpipinstallyaml2sbmlFor more info see thedocs.Getting StartedThe documentation of the tool is hosted onRead the Docs.Theformat documentationdescribes the input YAML.Jupyter notebooks containing examples can be found underdoc/examples.  Most notably:Lotka_Volterra.ipynbshowing the Python package,Lotka_Volterra_CLI.ipynbshowing the command-line interface, andLotka_Volterra_Model_Editor.ipynbdemonstrates the Model Editor.Basic SyntaxPythonA YAML model can be translated to SBML/PEtab in Python viaimportyaml2sbml# SBML conversionyaml2sbml.yaml2sbml(yaml_dir,sbml_dir)#PEtab conversionyaml2sbml.yaml2petab(yaml_dir,output_dir,sbml_name)Command-Line Interfaceand in the command-line via# SBML conversionyaml2sbml<yaml_dir><sbml_dir>#PEtab conversionyaml2petab<yaml_dir><output_dir><sbml_name>Format ValidationFormat validation is possible in Python viayaml2sbml.validate_yamland in the command-line viayaml2sbml_validate.How to citeyaml2sbmlis published in theJournal of Open Source Software.When usingyaml2sbmlin your project, please citeVanhoefer J., Matos, M. R. A., Pathirana, D., Schälte, Y. and Hasenauer, J. (2021). yaml2sbml: Human-readable and -writable specification of ODE models and their conversion to SBML. Journal of Open Source Software, 6(61), 3215,https://doi.org/10.21105/joss.03215@article{Vanhoefer2021,
  doi = {10.21105/joss.03215},
  url = {https://doi.org/10.21105/joss.03215},
  year = {2021},
  publisher = {The Open Journal},
  volume = {6},
  number = {61},
  pages = {3215},
  author = {Jakob Vanhoefer and Marta R. A. Matos and Dilan Pathirana and Yannik Schälte and Jan Hasenauer},
  title = {yaml2sbml: Human-readable and -writable specification of ODE models and their conversion to SBML},
  journal = {Journal of Open Source Software}
}ContactIf you have a question regarding the tool: Please drop us anissueor amail, we are happy to help.
Package: yaml2tree
yaml2treeCreates a tree of directories, specified using nested lists in YAMLUsage:[mode=XXX] yaml2tree <yaml-file>

    mode=XXX       set this env var to provide a chmod-style octal value to use as file mode
                   for the created directories.

    <yaml-file>    path to YAML file containing the directory tree specification.
                   The YAML is a list of values, where every value is either a directory name
                   or a list of the same form. The YAML is processed top-down and whenever a
                   nested list is encountered, any directories in it are created inside the 
                   directory last seen on the outer list.

                   For example, the following definition -
                       - foo
                       -   - bar
                           - baz
                           - tam
                       - foo1
                       -   - bar2
                           -   - baz3
                       - soap

                   creates the following directory tree in the current working directory -
                       foo/
                           bar/
                           baz/
                           tam/
                       foo1/
                           bar2/
                               baz3/
                       soap/
Package: yaml2workflow
yaml2workflowClarifaiworkflows are powerful tools. Building themvia the APIis a sure way to automate this process, especially if you have many nodes and branches.Taking inspiration fromKubernetes Helm ChartsandAWS Cloud Formation templates,yaml2workflowis designed to make automating the creation and managing the definition of workflows easier and more transparent.🙌 Define Workflows as YAML filesMuch clearer and more human-readable definitions without distractors. Also, by storing the workflow definitions as a file, you can now use version control for your future automations! Winning.# A single node workflowworkflow:id:test-wf-1nodes:-id:detectormodel:model_id:face-detectionmodel_version_id:45fb9a671625463fa646c3523a3087d5🙌 Export Workflows as YAML files[New!] Export your workflows into YAML files as well. Simply pass in the workflow object from a GetWorkflow response. Seeexport_example.pyfor how to do that.fromyaml2workflow.exporter.workflowimportExporterwithExporter(response.workflow)ase:e.parse()e.export("export_example.yml")🚀 InstallationSimply enterpip install yaml2workflow💪 UsageCreate a YAML file to define your workflow. Gather the model IDs and model version IDs fromClarifai. Seeparse_example.ymlfor a full, filled in template.Import the library and use it directly in your code as follows:fromyaml2workflow.parser.workflowimportparseworkflows=parse('parse_example.yml',stub=stub,metadata=metadata)post_workflows_response=stub.PostWorkflows(service_pb2.PostWorkflowsRequest(workflows=workflows),metadata=metadata)Seeparse_example.pyfor the full example.🎉 Done! You've now unlocked more human-readble and more maintable workflows.
Package: yaml2xbel
XBEL generator from YAMLThis generator can generate XBEL for bookmark exchange and storage from YAML
format.YAML input:Comics:xkcd:'https://xkcd.com'SMBC:'https://smbc-comics.com'Pepper and Carrot:'https://www.peppercarrot.com/'Specifications:Activity Streams 2.0:'https://www.w3.org/TR/activitystreams-core/'SMTP:'https://datatracker.ietf.org/doc/html/rfc5321'This should generate two folders, "Comics" and "Specifications", with the first
one containinghttps://xkcd.combookmarked under title "xkcd" and so on.
Package: yaml4rst
yaml4rst is a linting/checking/reformatting tool for YAML files documented with
inline RST which goes hand in hand withyaml2rst.It has been written to help with keeping thedefaults/main.ymlfile in
Ansible roles ofDebOpsup-to-date and to assist with writing or
including new roles. DebOps uses Sphinx to generate Ansible role documentation
which also includes the default role variables. Refer todebops/docsfor
details.UsageThe typical use case for this program is to improve the defaults YAML file of
Ansible roles.The recommended way to do this is to commit all your changes in the repository
of the role, then run:yaml4rst-e'ansible_full_role_name=ROLE_OWNER.ROLE_NAME'defaults/main.yml-ifrom the root of the role repository. Be sure to replaceROLE_OWNER.ROLE_NAMEwith the particular Ansible role name.This will check and reformat thedefaults/main.ymlfile in place.Now you can check the reformatted file with a diffing/editing tool of your choosing
and fix any warning whichyaml4rstmight have emitted.Refer toinput_filesandoutput_filesin thetests directoryfor
automatically tested examples of input and output files.Note that for continues usage yaml4rst is invoked fromdebops-optimizewhen
yaml4rst is installed so you might want to trydebops-optimize.FeaturesChecks for:Reasonable variable namespaceUndocumented variablesAutomatically fixes:RST sections which are not foldsUndocumented variables (adds a FIXME for the user)Documented variables which are not foldsYAML documents without a defined headerSpacing between variables and sectionsKnown limitationsDoes not handle folds with implicit level and missing closing fold marker.Status: Should be doable but currently not needed nor implemented. ANotImplementedErrorexception is thrown which causes the CLI program to
terminate immediately with an error and reference to this section.As workaround just strip out the opening folds with your favorite editor asyaml4rstwill add missing folds for sections and variables anyway.
Refer to theMakefile(prepare-real-datatarget) where such a workaround
is used for integration testing. Note that this is not perfect as can be seen
on thedebops.apt_installtest case.RepositoryGitHub(primary repo with issue tracker)DocumentationRead the DocsAuthorsRobin SchneiderLicenseGNU Affero General Public License v3 (AGPL-3.0)
Package: yamlarg
yamlargEasy YAML arguments for python scripts.Usagepython3.8-mpipinstallyamlargimportyamlargargs=yamlarg.parse('argument_file.yaml')Example YAML arguments file.---string:help:Example string parameter.type:strdefault:'defaultstring'bool_false:help:Example boolean with a default of false.default:Falseaction:'store_true'bool_true:help:Example boolean with a default of truedefault:Trueaction:'store_false'list:help:List of n number of unnamed arguments.default:''nargs:'*'Running a python script would then look like this.python3.8./script.py--string"this is a test string"--bool_false--bool_true--listabc{'string':'this is a test string','bool_false':True,'bool_true':False,'list':['a','b','c']}ChangelogAdded "description" as an optional argument for the parse function.Changed the description formatting to raw to allow for newlines in the description.
Package: yamlator
YamlatorYamlator is a CLI tool that allows a YAML file to be validated using a lightweight schema that defines the expected structure. When executed, the YAML is compared against the rules to validate that the relevant keys and data types are present. Once validated, a list of violations will be displayed to help amend the YAML file.Installing the packageThe Yamlator package can be installed from PyPi with:pipinstallyamlatorA basic exampleSchemas in Yamlator are comprised of rules, rulesets and enums, which are defined in a Yamlator schema file with the.ysextension.In the Yamlator schema file, the entry point is defined in aschemablock. As a minimum, a schema block must be defined for Yamlator to validate a file. Complex structures can be defined asrulesetsto validate nested structures. For example, the following schema can be defined to manage a list of employees:ruleset Employee {
    firstName str
    lastName str
    roles list(str) optional
}

schema {
    employees list(Employee)
}This schema can then be used to validate the following YAML data:employees:-firstName:employeelastName:oneroles:-manager-firstName:employeelastName:tworoles:-engineer-manager-firstName:employeelastName:threeMore information on the different components that can be used in a schema can be found in theschema components documentation.Additional examples of Yamlator schemas can be found in theexamples directoryHow to run the CLIAssuming you have a YAML and Yamlator schema file, the CLI can be executed with:yamlator<path-to-yaml-file>-s<path-to-yamlator-schema>Where<path-to-yaml-file>is replaced with the path to your YAML file and<path-to-yamlator-schema>is the path to the schema file which must have the.ysextension.The first argument for the CLI is always the path to the YAML file.FlagAliasDescriptionIs Required--schema-sThe schema that will be used to validate the YAML fileTrue--output-oDefines the violations format that will be displayed. Supported values aretable,yamlorjson. Defaults totableif not specified.FalseTo see the help options for the CLI, runyamlator -horyamlator --helpSetting up the development environmentFor instructions on how to set up the development environment, read thesetting up the environment documentation.
Package: yaml-axis-parser
yaml-axis-parserA simple command line tool to output the combinations for a yaml axis file used byyaml-axis-plugin.InstructionsInstallationpipinstallyaml-axis-parserUsageyaml-axis-parserpath/to/axis.yaml
yaml-axis-parser--exclude-keyexcludepath/to/axis.yamlusage: yaml-axis-parser [-h] [--exclude-key EXCLUDE_KEY] file

positional arguments:
  file                  The yaml axis file

optional arguments:
  -h, --help            show this help message and exit
  --exclude-key EXCLUDE_KEY, -e EXCLUDE_KEY
                        The exclude key. Defaults to "exclude"
Package: yaml_backed_structs
Basic python data structures backed by a human editable yaml fileDescriptionProvides a dead simple way to store small amounts of information for python programs.
This is useful for program configs and similar.Has the advantage that the files backing the data structures are human readable and
can be edited using your favorite text editor.fromyaml_backed_structsimportPersistentDict,PersistentSetpdict=PersistentDict('my-path.yml')pdict['a']=1# this will automatically be savedpdict['b']=[]pdict['b'].append(2)# this will not be saved automaticallypdict.save()# but we can save it like thisInstallationpipinstallyaml_backed_structspythonsetup.pyinstallLicenceMITAuthorsyaml_backed_structswas written byDavid C.Danko.
Package: yamlbundler
YAML Bundleryamlbundleris a useful command that bundles multiple YAML files into a single file.
It finds!includetag in a YAML file and replaces it with the contents of another YAML file.InstallpipinstallyamlbundlerQuick startSave these files in your working directory.# ./main.yaml# include entire filea:!include./sub1.yaml# relative path from the parent directory of main.yamlb:!includefilepath:./sub2.yaml# include specific value using jsonpathc:!includefilepath:./sub1.yamljsonpath:$.foo# include multiple files# Array elements are flattened.d:!include-filepath:./sub1.yaml-filepath:./sub2.yaml# include multiple files# If all of them are map elements, they are merged into a single map.e:!include-filepath:./sub1.yaml-filepath:./sub3.yaml# ./sub1.yamlfoo:bar# ./sub2.yaml-one-two# ./sub3.yamlhoge:!include# relative path from the parent directory of sub3.yaml (not main.yaml)filepath:./sub2.yamljsonpath:$[0]Then, run this command.
The result is shown in your terminal as STDOUT.
Comments in original YAML are removed.yamlbundler./main.yaml# a:#   foo: bar# b:# - one# - two# c: bar# d:# - foo: bar# - one# - two# e:#   foo: bar#   hoge: oneYou can save the result as a new file using--outputparameter.
If you want to overwrite the original file, use--inplaceparameter.yamlbundler--output./result.yaml./main.yaml
yamlbundler--inplace./main.yamlFeedbackIf you find any bugs, please feel free to create an issue.
Package: yamlcfg
yamlcfg=======Hierarchical YAML configuration utility for Pythonyamlcfg makes it easier to have different levels of YAML configuration files,with prioritization that you declare, based on the order of the `paths`keyword argument.It first checks your environment for the variable, and if it exists, it usesthat over anything else. Then it checks the first file in `paths`, or `path`,and then the next in order until the variable is found. If not found, it returnsNone.Access is allowed via normal attribute access via the dot operator, or froman index such as `config['myattr']`.To dump the full configuration that was loaded back to file (first path in`paths`), just invoke `write()`.Example:from yamlcfg import YamlConfigconfig = YamlConfig(path='~/.some_config.yml')print(config.foo)config.foo = 'bar'config.write()fifo_configs = YamlConfig(paths=('.myconfig.yml', '~/.userconfig.yml', '/etc/myconfig/defaultconfig.yml'))# First checks .myconfig.yml, and if it doesn't exist there, it checks# ~/.userconfig.yml, and so on. If an environment variable of the same name# is set, it will use that first.print(fifo_configs.some_var)# Dumps to the first path in paths, with every variable it found in order.fifo_configs.write()
Package: yamlconf
This library provides a means to read yaml configuration files and propagate
default values in reasonable ways.  Nothing complicated.Installation:pip install yamlconfigExample:>>> import yamlconf
>>>
>>> doc = yamlconf.loads("""
... test: demo_test
...
... tests:
...     defaults:
...         foo: 5
...     demo_test:
...         bar: 6
... """)
>>>
>>> doc['tests'][doc['test']]['foo']
5
>>> doc['tests'][doc['test']]['bar']
6Functions:load(file-like) : Returns adictwith defaults propagatedloads(string) : Returns adictwith defaults propagatedload_module(class-path) : Imports and returns
Package: yaml-config-builder
Config BuilderThe ConfigBuilder provides an SDK for building configuration classes on the basis of
given content from YAML configuration files. Details about the ConfigBuilder can be
found in thedocumentation.InstallThe installation and setup of the ConfigBuilder is described inchapter 11of the documentation.Technology stackPythonLicenseSee the license file in the top directory.Contact informationMaintainer:Maximilian Ottenmaximilian.otten@iml.fraunhofer.deDevelopment Team:Christian Hoppechristian.hoppe@iml.fraunhofer.deOliver Bredtmannoliver.bredtmann@dbschenker.comThilo Bauerthilo.bauer@dbschenker.com