Saravanan666/pypi-org huggingface dataset:
Package: ansi2html
ansi2htmlConvert text with ANSI color codes to HTML or to LaTeX.Inspired by and developed off of the work ofpixelbeatandblackjack.Read the docsfor more
informations.Example - Python APIfromansi2htmlimportAnsi2HTMLConverterconv=Ansi2HTMLConverter()ansi="".join(sys.stdin.readlines())html=conv.convert(ansi)Example - Shell Usage$ls--color=always|ansi2html>directories.html
$sudotail/var/log/messages|ccze-A|ansi2html>logs.html
$taskrc._forcecolor:yeslimit:0burndown|ansi2html>burndown.htmlSee the list of full options with:$ansi2html--helpGet this project:$pip3installansi2htmlSource:https://github.com/pycontribs/ansi2html/pypi:https://pypi.org/project/ansi2html/Licenseansi2htmlis licensed LGPLv3+.CreditsAuthor:Ralph BeanContributor:Robin Schneider
Package: ansi2image
ANSI to ImageA Python lib to convert ANSI text to ImageANSI2Image officially supports Python 3.8+.Main featuresRead ANSI file (or ANSI stdin) and save an image (JPG or PNG)Installationpip3install--upgradeansi2imageHelpANSItoimagev0.1.1byHelvioJunior
ANSItoImageconvertANSItexttoanimage.
https://github.com/helviojunior/ansi2imagepositionalarguments:[filename]Filepathor-tostdin

Options:-o--output[filename]imageoutputfile.--font[font]fonttype.(default:JetBrainsMonoRegular).--font-listListallsupportedfontfamilyandvariations-h,--helpshowhelpmessageandexit-vSpecifyverbositylevel(default:0).Example:-v,-vv,-vvv--versionshowcurrentversionANSI referencehttps://en.wikipedia.org/wiki/_ANSI_escape_code
Package: ansi2txt
ansi2txtansi to plain text converterRelatedHere are some related projectscolorized-logsstrip-ansi-cliAcknowledgementsThis code base is a translation/port of theansi2txt.ccode base fromcolorized-logsto Python3 and Bash.
This project came about because I liked the originalansi2txt's output but did not want to have to compile it or ship binaries around.
I ported ansi2txt.c → ansi2txt.py but then came across an environment without python so went ansi2txt.py → ansi2txt.sh.LicenseAGPLv3ANDMITRunning TestsTo run tests, run the following commandbatsansi2txt.bats
Package: ansibeautifier
ANSI BeautifierThis is a beautifier project to beautify your python command-line or GUI applications.It uses ANSI Escape codes (\u001b) to color the text.InstallationpipinstallansibeautifierUsagefromansibeautifierimportBeautifierb=Beautifier()print(b.red(text="Hello World",bright=False))ReturnsHello Worldin red but not bright as we have given the bright=False parameterThe default bright parameter is False.Variable UsageYou can also store the colored text in a variablefromansibeautifierimportBeautifierb=Beautifier()text=b.green(text="Hello World",bright=False)print(text)This also prints the same result but in a pythonic way!Colors supportedGreen - ansibeautifier.Beautifier.green()Red - ansibeautifier.Beautifier.red()Blue - ansibeautifier.Beautifier.blue()Black - ansibeautifier.Beautifier.black()White - ansibeautifier.Beautifier.white()Yellow - ansibeautifier.Beautifier.yellow()Magenta - ansibeautifier.Beautifier.magenta()Cyan - ansibeautifier.Beautifier.cyan()Other functionsansibeautifier.Beautifier.always_<color_name>()It colors the terminal in which you run the python code. It can be reset by using the ansibeautifier.Beautifier.reset_foreground_color() functionfromansibeautifierimportBeautifierb=Beautifier()print(b.always_white(text="Hello World"))print(b.reset_foreground_color())ansibeautifier.Beautifier.background_<color_name>()It colors the background of the text to the color specified
It can be nullified by the ansibeautifier.Beautifier.reset_background_color() functionfromansibeautifierimportBeautifierb=Beautifier()print(b.background_black(text="Hello World",bright=True))print(b.reset_colors())ansibeautifier.Beautifier.always_background_<color_name>()It colors the background of the terminal and the text specifiedfromansibeautifierimportBeautifierb=Beautifier()print(b.always_background_cyan(text="Hello World"))print(b.reset_colors())ansibeautifier.Beautifier.bold()It returns bold text. It can be neutralized by the ansibeautifier.Beautifier.reset_intensity() function.fromansibeautifierimportBeautifierb=Beautifier()print(b.bold(text="Hello World"))print(b.reset_intensity())It returnsHello Worldansibeautifier.Beautifier.underline()It returns underlined text. It can also be neutralized by the ansibeautifier.Beautifier.reset_intensity() function.fromansibeautifierimportBeautifierb=Beautifier()print(b.underline(text="Hello World",always=True))print(b.reset_intensity())This underlines all the text in the terminal and the text given.ansibeautifier.Beautifier.reverse()It returns like highlighted text.fromansibeautifierimportBeautifierb=Beautifier()print(b.reverse(text="Hello World",always=True))print(b.reset_intensity())ansibeautifier.Beautifier.conceal()It returns hidden text and you can unhide it by the ansibeautifier.Beautifier.reset_intensity() function.importtimefromansibeautifierimportBeautifierb=Beautifier()print("Hello World")print(b.conceal(text="Hello World"))print("Hello World")time.sleep(0.5)print(b.reset_intensity())Try this!Thanks for readingIf you want the source code you can visit my GitHub pagehttps://github.com/BoughtData92730/ansibeautifier
Package: ansibilo
Ansibilo is a set of tools for Ansible. It provides:facto, an Ansible module to create secrets and select unused ports on the remote host (and reused them at the next run).A command line interface to export Ansible inventory in different formats.Some filter and callback plugins.A Sphinx extension which allow to include a graph of the inventory in the documentation.InstallationIntall the package fromPyPI, using pip:pipinstallansibiloOr from GitHub:gitclonegit://github.com/Polyconseil/ansibiloLinksSources:http://github.com/Polyconseil/ansibiloDocumentation:http://readthedocs.org/docs/ansibilo/Package:http://pypi.python.org/pypi/ansibilo/
Package: ansiblator
Ansiblator==========Ansiblator - makes Ansible api more PythonicThis wrapper allows more easier way how to use Ansible in Python.Chain commands without without playbooks. More like Fabric.With this Ansible can be more powerfull and it will allow to chain commands withpython commands. Ansible documentation is on http://docs.ansible.com/.API is now trying to feel like Fabric, but it's still not complete, therewill be some changes.Get started===========For instalation you can download package and then just unpack package fromhttps://pypi.python.org/pypi/ansiblator and use it::python setup.py installor install by pip::pip install ansiblatorQuickstart==========For most quickest example you can just create your ansible host file namedansible_hosts inside your home directory or give full path to file.Ansiblator is mainly using file such as in ~/ansible_hosts.code::import ansiblator.api as anans = an.Ansiblator()ret = ans.local("uname -a", now=True, use_shell=True)ans.run("uname -a", now=True)ans.runner("uptime")ans.run_all()ans.copy(src="/tmp/aabc.csv", dest="/tmp/",pattern="pc",now=True)specify ansible hosts file and select pattern::ans = an.Ansiblator(inventory="/tmp/ansible_file", pattern="pc")use dictionary to create inventory::inv = {'pc':[{'ssh_host':'192.168.0.10', 'ssh_user':'test_user', 'su_user':'root'},{'ssh_host':'192.168.0.12', 'ssh_user':'test_user2', 'su_pass':'paasswd','su_user':'root'}]}ans = an.Ansiblator(inventory=inv)ans.run("uname -a", now=True)prepare commands and run after::ans = an.Ansiblator(run_at_once=False)ans.get(src="/tmp/file", dest="/tmp/")ans.get(src="/tmp/file2", dest="/tmp/")ans.run_all()make custom class::class Automatization(Ansiblator):def update_server(self, su=True,sudo=False):self.run("apt-get update", su=su, sudo=sudo)self.run("apt-get upgrade -y", su=su, sudo=sudo)use custom class and more patterns together::ans = Automatization(pattern=['servers', 'production', 'test', 'pc'])ans.update_server()With this, you can create full commands or functions and just pass to thempattern and run at the end.Need all modules inside Ansible?::ans = an.Ansiblator()ans.get_all_modules()#now you should be able to do >ans.user(name="hugo")#or evenans.pip(name="six", virtualenv="/tmp/venv", virtualenv_site_packages="yes")More information================Ansiblator automatically saves returned json values for actuall runs, soyou can use them for testing and conditions. For exampletesting::return_code = ans.local("uname -a", now=True, use_shell=True)return_code['contacted']orreturn_code = ans.local(["uname", "-a"], now=True, use_shell=False)return_code['contacted']Todo====- make more tests- improve logging- improve DictToInventory mapper, so more options are possible, such as groups and so onChanges=======- ability to run on more patterns- fixes on more runs- run all modules on ansibleInfo====For more information you can consult functions or actual Ansible documentation.More information can be also used on http://www.pripravto.cz. You can alsocontact us there.
Package: ansible-1password-lookup-plugin
1Password Local Lookup PluginThis is a simple lookup plugin that search for secrets in a local 1Password database (B5.sqlite format).
It uses theonepassword-local-searchpython module that
greatly improve performance over querying directly the 1Password servers.RequirementsYou require:python 3.7onepassword-local-search modulepip3 install onepassword-local-searchExample Playbook- hosts: servers
  roles:
    - role: mickaelperrin.ansible-onepassword-local-lookup-plugin
  tasks
    - debug:
        msg: "{{ lookup('onepassword_local', 'p6iyvjqv4xdxw52hsacpkq4rgi', field='name') }}"
    - debug:
        msg: "{{ lookup('onepassword_local', 'c3264cef-1e5e-4c96-a192-26729539f3f5', field='your_custom_field') }}"
    - debug:
        msg: "{{ lookup('onepassword_local', '1234567890', field='password') }}"Custom uuid featureuuid in 1Password changes when you move an item from one vault to another. To prevent this issue, a custom uuid mapping feature has been implemented.You need to add on each item a field namedUUID(in capitals).Then runop-local mapping updateto generate the mapping table relationship.You can display UUID mapping by runningop-local mapping list.As we migrated from Lastpass to 1Password, we have also implemented a UUID mapping feature
related to a field namedLASTPASS_ID. If the uuid given is 100% numeric, the search query will be performed over this field.TestsTests are managed bypytestfor the python part andmoleculefor the ansible part withdockeras driver.mkvirtualenv3 ansible-onepassword-local-lookup-plugin
pip install -r requirements/dev.txtPytestpytestMoleculeEnsure thatdockerservice is up and runningmolecule testLicenseGPLv3
Package: ansible2puml
ansible2pumlAbout ansible2pumlCreate an PlantUML activity diagram from playbooks and roles trough python.A .puml file with the PlantUML syntax is generated and a link to display the diagram as PNG is generated.RequirementsPython version >3.6Install packageInstall via pypipipinstallansible2pumlInstall via gitpipinstallgit+https://github.com/ProfileID/ansible2pumlHow toPlaybookansible2puml --source play.yml --destination play.pumlExampleSource:example-playbook.yml
Package: ansible-anonymizer
Library to clean up Ansible tasks from any Personally Identifiable Information (PII)Free software: Apache Software License 2.0Anonymized fieldsCredit Card numberemail addressIP addressMAC addressUS SSNUS phone numberYAML commentpassword value, when the field name is identified as being sensitiveuser name from home directory pathUsageThe library can be used to remove the PII from a multi level structure:fromansible_anonymizer.anonymizerimportanonymize_structexample=[{"name":"foo bar","email":"my-email@address.com"}]anonymize_struct(example)# [{'name': 'foo bar', 'email': 'noah2@example.com'}]But you can also anonymize a block of text:fromansible_anonymizer.anonymizerimportanonymize_text_blocksome_text="""
- name: a task
  a_module:
    secret: foobar
"""anonymize_text_block(some_text)# '\n- name: a task\n  a_module:\n    secret: "{{ secret }}"\n'You can also use theansible-anonymizercommand:ansible-anonymizer my-secret-fileCustomize the anonymized stringsBy default, the variables are anonymized with a string based on the name of the field.
You can customize it with thevalue_templateparameter:fromansible_anonymizer.anonymizerimportanonymize_structfromstringimportTemplateoriginal={"password":"$RvEDSRW#R"}value_template=Template("_${variable_name}_")anonymize_struct(original,value_template=value_template)#  {'password': '_password_'}Limitationsanonymize_text_block()relies on its own text parser which only support a subset of YAML features. Because of this, it may not be able to identify some PII. When possible, useanonymize_structwhich accepts a Python structure instead.The Anonymizer is not a silver bullet and it’s still possible to see PII going through the filters.
Package: ansible-api
ansible-api v0.5.1A restful http api for ansible
python version >= 3.7What is it?Ansibleis a radically simple IT automation system.
If you are trying to use it and not like CLI, you can try me now. I can provide you use ansible by A RESTful HTTP Api and a realtime processing message (websocket api), you can see all details.Changelog0.5.1add sha256 encryption support for signature (thx: jbackman)fit for latest ansible(v2.8.6) and ansible-runner(v1.4.2)add more error event capture in response0.5.0 replace tornado with sanic, more lightly (python>=3.7)0.3.0 using ansible-runner as middleware0.2.6 adaptive ansible 2.6.4 and add asynchronization mode0.2.2 optimize log0.2.1 optimize log and allow mutil-instance in the same host0.2.0 support websocket, remove code invaded in ansibleStructure chartHow to install[preparatory work] python version >= 3.7 (use asyncio featrue)pip3 install ansible-apiHow to start itdefault configuration: /etc/ansible/api.cfgstart:ansible-api -c [Configfile, Optional] -d [Daemon Mode, Optional]eg: ansible-api -c /etc/ansible/api.cfg -d > /dev/null &How to prepare your dataHTTP API Usage
Package: ansible-apply
Ansible-apply takes the tasks file spec as first argument:ansible-apply role.name
ansible-apply role.name/some_tasks
ansible-apply https://some/playbook.yml
ansible-apply ./playbook.ymlIt will automatically download the playbook or role if not found.Then, the command takes any number of hosts and inventory variables on
the command line:ansible-apply role.name server1 server2 update=trueFinnaly, any argument passed with dashes are forwarded to the
ansible-playbook command it generates, but named args must use the=notation, and not a space to not confuse the command line parser:# works:
ansible-apply role.name server2 update=true --become-user=root
# does not:
ansible-apply role.name server2 update=true --become-user root
Package: ansibleawx-client
Ansible AWX ClientDonate to help keep this project maintainedSummaryThis is a unofficial python API client for Ansible AWX.RequirementsrequestsQuick Start GuideInstall Ansible AWX Clientpip install ansibleawx-clientInitialize API ClientYou can do this with your username and password or using your Token.Initialize client with your username and passwordimport ansibleawx

API_URL = "http://my-ansibleawx.com/api/v2"

client = ansibleawx.Api("username", "password", api_url=API_URL)Initialize client with your tokenimport ansibleawx

API_URL = "http://my-ansibleawx.com/api/v2"
TOKEN = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"

client = ansibleawx.Api(api_url=API_URL, token=TOKEN)ExamplesGet Inventories# to get all inventories
response = client.get_inventories()

# to get specific inventory by id
response = client.get_inventories(1)Get Jobs Templates# to get all jobs templates
response = client.get_jobs_templates()

# to get specific job template by id
response = client.get_jobs_templates(1)Launch Job Template by idresponse = client.launch_job_template(1)Relaunch Job by idresponse = client.relaunch_job(1)Cancel Job by idresponse = client.cancel_job(1)Function ReferenceConsult theAnsible Tower documentationfor more details.
Package: ansible-base
AnsibleAnsible is a radically simple IT automation system. It handles
configuration management, application deployment, cloud provisioning,
ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex
changes like zero-downtime rolling updates with load balancers easy. More information onthe Ansible website.Design PrinciplesHave a dead simple setup process and a minimal learning curve.Manage machines very quickly and in parallel.Avoid custom-agents and additional open ports, be agentless by
leveraging the existing SSH daemon.Describe infrastructure in a language that is both machine and human
friendly.Focus on security and easy auditability/review/rewriting of content.Manage new remote machines instantly, without bootstrapping any
software.Allow module development in any dynamic language, not just Python.Be usable as non-root.Be the easiest IT automation system to use, ever.Use AnsibleYou can install a released version of Ansible viapip, a package manager, or
ourrelease repository. See ourinstallation guidefor details on installing Ansible
on a variety of platforms.Red Hat offers supported builds ofAnsible Engine.Power users and developers can run thedevelbranch, which has the latest
features and fixes, directly. Although it is reasonably stable, you are more likely to encounter
breaking changes when running thedevelbranch. We recommend getting involved
in the Ansible community if you want to run thedevelbranch.Get InvolvedReadCommunity
Informationfor all
kinds of ways to contribute to and interact with the project,
including mailing list information and how to submit bug reports and
code to Ansible.Join aWorking Group, an organized community devoted to a specific technology domain or platform.Submit a proposed code update through a pull request to thedevelbranch.Talk to us before making larger changes
to avoid duplicate efforts. This not only helps everyone
know what is going on, it also helps save time and effort if we decide
some changes are needed.For a list of email lists, IRC channels and Working Groups, see theCommunication pageCoding GuidelinesWe document our Coding Guidelines in theDeveloper Guide. We particularly suggest you review:Contributing your module to AnsibleConventions, tips and pitfallsBranch InfoThedevelbranch corresponds to the release actively under development.Thestable-2.Xbranches correspond to stable releases.Create a branch based ondeveland set up adev environmentif you want to open a PR.See theAnsible release and maintenancepage for information about active branches.RoadmapBased on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.7, 2.8).
TheAnsible Roadmap pagedetails what is planned and how to influence the roadmap.AuthorsAnsible was created byMichael DeHaanand has contributions from over 4700 users (and growing). Thanks everyone!Ansibleis sponsored byRed Hat, Inc.LicenseGNU General Public License v3.0 or laterSeeCOPYINGto see the full text.
Package: ansible-bender
ansible-benderThis tool bends containers usingAnsibleplaybooksand turns them into container images. It has a pluggable builder selection —
it is up to you to pick the tool which will be used to construct your container
image. Right now the only supported builder isbuildah.Moreto
comein the future.
Ansible-bender (ab) relies onAnsible connection
pluginsfor
performing builds.tl;dr Ansible is the frontend, buildah is the backend.The concept is described in following blog posts:Building containers with buildah and ansible.Ansible and Podman Can Play Together Now.Looking for maintainers ❤This project doesn't have an active maintainer right now thatwould watch issues daily.If you are a user of ansible-bender and are familiar with Python, please consider becoming a maintainer.FeaturesYou can build your container images with buildah as a backend.Ansible playbook is your build recipe.You are able to set various image metadata via CLI or as specific Ansible vars:working directoryenvironment variableslabelsuserdefault commandexposed portsYou can do volume mounts during build.Caching mechanism:Every task result is cached as a container image layer.You can turn this off with--no-cache.You can disable caching from a certain point by adding a tagno-cacheto a task.You can stop creating new image layers by adding tagstop-layeringto a task.If an image build fails, it's committed and named with a suffix-[TIMESTAMP]-failed(so
you can take a look inside and resolve the issue).The tool tries to find python interpreter inside the base image.You can push images you built to remote locations such as:a registry, a tarball, docker daemon, ...podman pushis used to perform the push.DocumentationYou can read more about this project in the documentation:Documentation homeInterfaceInstallationConfigurationUsageCaching and Layering mechanismContribution guideAnsible-bender in OKD
Package: ansible-builder
Ansible BuilderAnsible Builder is a tool that automates the process of building execution
environments using the schemas and tooling defined in various Ansible
Collections and by the user.See the readthedocs page foransible-builderat:https://ansible-builder.readthedocs.io/en/stable/Get Involved:We useGitHub issuesto
track bug reports and feature ideasWant to contribute, check out ourguideJoin us in the#ansible-builderchannel on Libera.chat IRCFor the full list of Ansible email Lists, IRC channels and working groups,
check out theAnsible Mailing
listspage of the official Ansible documentation.Code of ConductWe ask all of our community members and contributors to adhere to theAnsible
code of
conduct. If
you have questions, or need assistance, please reach out to our community team
atcodeofconduct@ansible.comLicenseApache License v2.0