Saravanan666/pypi-org huggingface dataset:
Package: terraclip
This is a python class to generate Ardupilot mission files and auxiliary files (Stats file and export files).
The output mission file contains WP's set to 'ABSOLUTE' heights for better mission previsibility and can be imported directly in Mission Planner.Beta (and use at your own risk)Evaluation site:https://rodrigo-nh.github.io/TerraclipTestPage/FeaturesConfigurable parameters (flight altitude, altitude tolerance, max distance between WPs, takeoff/land optional commands)Anti-collision check, guarantees minimal altitude above ground along all flight pathExports to reference KML file (and other formats) containing 3D WP's, paths and statsDoesn't care about your vector/DEM input files DATUM/CRS, converts accordinglyDownloads necessary DEM scenes automatically (requires a Open Topography API keyhttps://opentopography.org/) or loads custom user DEM.Outputs a stat file containing minimal flight altitude, max flight altitude, max generated inclination and suggested RTL_ALT (max DEM scene altitude plus<flightAlt>)How it worksDraw a path in GoogleEarth containing desired flight path. Export the path to a KML/KMZ file. Generated mission will respect the vertices from your path, converting vertices to WP's.Check example.py about how to use it. The parameters are set by the command:setparams(<flightAlt>, <tolerance>, <maxDistBetweenWPs>, Takeoff=<bool>, Land=<bool>)<flightAlt>=> Flight altitude above ground. This will be the minimal altitude to be respected along all path<tolerance>=> Flight altitude tolerance (in %). Means Minimal altitude along path can reach<flightAlt>minus tolerance<maxDistBetweenWPs>=> Divide your original WP's into sections (creating another WP's), respecting this max distance between WP's. The lower this parameter the more a 'terrain following' effect. Set this to zero to not create any aditional WP's.Takeoff=<bool>=> Optional. Converts the first WP's from your file into Takeoff commandLand=<bool>=> Optional. Converts the last WP from your file into Land command.How to installpip install terraclipRequires Python > 3Requires gdal python bindings (Windows users can try this recipe for the python bindingshttps://gist.github.com/Rodrigo-NH/94d1fe07646052ad32133824c85b4221)Requires numpy and gdalwrap (check requirements.txt)
Package: terra-common
This is the Terra API.RequirementsOn Ubuntu, do not use the system packages, which are too old.docker-ce:https://docs.docker.com/install/linux/docker-ce/ubuntu/docker-compose:sudo pip3 install docker-composeUsageFirst launchCreate a docker.env file:mv docker.env.dist docker.envEdit the settingsBuild Containerdocker-compose buildRunning the projectdocker-compose updocker-compose downdocker-compose up(postgres image)Running testsdocker-compose exec django bashdjango@container_id:/code$ source venv/bin/activate(venv) django@353cfc271a48:/code$ tox(global)Applying Django migrationsdocker-compose run --rm django /code/venv/bin/python3.6 ./manage.py migrate
Package: terracomp-typer
terracomp-typerThis package allows you to easily build aTyperCLI application from a Python module hierarchy.Quickstart$ tree src/mypackage/commands/
src/mypackage/
├── __init__.py
├── __main__.py
└── commands
    ├── __init__.py
    ├── hello.py
    └── bye.py# src/mypackage/commands/hello.pydefmain(name:str)->None:print("Hello,",name)# src/mypackage/__main__.pyfromterracomp_typerimportbuild_app_from_moduleif__name__=="__main__":app=build_app_from_module("mypackage.commands")app()FeaturesPackages are treated as command groups andmaydefine adef callback(): ...(seeTyper.add_callback()).Modules are treated as commands andmustdefine adef main(): ...(seeTyper.command()).Underscores in package or module names are normalized to hyphens (e.gmy_command->my-command).Command(-group) help text is extracted from the package or module docstring, or from themain()docstring.[WIP] Improved and dynamic dependency injection.Support for new-style type hints in older versions of Python and Typer (e.g.str | None).Dependency InjectionTheterracomp_typer.DependencyInjectoris essentially a mapping of types to a corresponding implementation. It allows
you to bind any function to the given dependencies based on the function signature.Thebuild_app_from_module()takes adependenciesargument which populates aDependencyInjector. Allcallback()andmain()functions encountered and added to atyper.Typerobject are first bound to the dependencies that can be
served by the injector.The types for which injection can take place must be known in advance. If the implementation is not known in advance,
acallback()can accept theDependencyInjectoras an argument and inform about the dependencies that will be
provided by the callback, allowing any of its subcommands to resolve it.# src/mypackages/commands/__init__.py"""This is a cool CLI that uses terracomp-typer."""frommypackage.configimportCliConfigfrompathlibimportPathfromterracomp_typerimportDependencyInjector,DelayedBindingfromtyperimportOptiondefcallback(config_file:Path=Option(Path("~/.config/mypackage.ini"),help="Path to the configuration file."),dependencies:DependencyInjector=DelayedBinding(CliConfig),)->None:dependencies.register_supplier(CliConfig,lambda:CliConfig.load(config_file))# src/mypackage/commands/hello.pyfrommypackage.configimportCliConfigdefmain(name:str,config:CliConfig)->None:# ...In the above example, theconfigparameter is not passed byTyper, but instead by theDependencyInjectorper the implementation in the previouscallback()snippet.Known caveatsOnly concrete types are supported (noOptional[CliConfig]or vice versa).New-style type hint supportThroughtypeapi, we can convert new-tyle type hints such asstr | Noneorlist[int]to their corresponding
representation usingtypingbefore the function signature is parsed byTyper. Usually, ty# src/mypackage/commands/hello.pyfrommypackage.configimportCliConfigdefmain(name:str|None=None)->None:# ...
Package: terraecs
terraecsTerraecs is a simple cli tool to run a once-offECS/Fargatetask that relies on aterraformedinfrastructure.Preview release, please do not use for anything important!MotivationI want to run a command (be it ror-rake, laravel-artisan, etc.) in a Fargate environmentI use terraform for IaC, and do not want to deviate from thatI also do not want to think about infrastructure when running a command, as it should be already setup via terraformThese once-off tasks are dirty, I want to have direct feedback on how it went (logs + exit status)Installation$pipinstallterraecsUsageYou will need to create a Fargate task module to create a task-definition and any other supporting resources (networking/cloudwatchlogs). At a minimum the module will have to output the following:output"cluster_id"{value="${var.cluster_id}"}output"subnets"{value="${var.subnets}"}output"security_group_id"{value="${aws_security_group.main.id}"}output"task_definition_arn"{value="${aws_ecs_task_definition.main.arn}"}Terraform 0.12 and later intentionally track only root module outputs in the state. To expose module outputs for external consumption, you must export them from the root module using an output block, which as of 0.12 can now be done for a single module all in one output:output"custom_ecs_task"{value=module.custom_ecs_task}Once you have applied your terraform config, pull the output into a json:$terraformoutput-jsoncustom_ecs_task>output.jsonNow you can useterraecsto run any command based off the above task-definition:$terraecs-foutput.jsonrun"command""arg1""arg2"OutputThe output can look something like this:❯AWS_PROFILE=stagingterraecs-foutput.jsonrunartisan--help2019-04-1008:14:01,884botocore.credentials[INFO]Foundcredentialsinsharedcredentialsfile:~/.aws/credentials2019-04-1008:14:03,893root[INFO]launchedtask:arn:aws:ecs:eu-west-1:1111111111111:task/staging-main/4544cfd6f10e4ff0b16458666362cbd92019-04-1008:14:04,069root[INFO]PROVISIONING2019-04-1008:14:25,461root[INFO]PENDING2019-04-1008:15:51,642root[INFO]DEPROVISIONING2019-04-1008:16:13,632root[INFO]STOPPED
Description:Listscommands
Usage:list[options][--][<namespace>]Arguments:namespaceThenamespacename
Options:--rawTooutputrawcommandlist--format=FORMATTheoutputformat(txt,xml,json,ormd)[default:"txt"]Help:Thelistcommandlistsallcommands:phpartisanlistYoucanalsodisplaythecommandsforaspecificnamespace:phpartisanlisttestYoucanalsooutputtheinformationinotherformatsbyusingthe--formatoption:phpartisanlist--format=xmlIt'salsopossibletogetrawlistofcommands(usefulforembeddingcommandrunner):phpartisanlist--raw
Package: terraenv
terraenvTerraform&Terragruntversion manager inspired byrbenv,tfenv,tgenvSupportCurrently terraenv supports the following Operating SystemMac OS X (64bit)Linux (64bit)InstallationAutomaticInstall via Homebrew on OSx$brewtapaaratn/terraenv$brewinstallterraenvInstall via Python pip$pipinstallterraenvUpgradevia Homebrew on OSx$brewupgradeterraenvManual on Linux And OSXDownload terraenv for your operating systemLinux$wgethttps://github.com/aaratn/terraenv/releases/latest/download/terraenv_linux_x64.tar.gzOSX$wgethttps://github.com/aaratn/terraenv/releases/latest/download/terraenv_osx_x64.tar.gzExtract Tar ArchiveLinux$tar-xvzfterraenv_linux_x64.tar.gzOSX$tar-xvzfterraenv_osx_x64.tar.gzCopy the extracted file to your/usr/local/bindirectory$cpterraenv/usr/local/bin/terraenvOn Ubuntu/Debian touching/usr/local/binmight require sudo accessUsageterraenv <terraform / terragrunt > install [version]Install a specific version of Terraform. Available options for version:1.2.3exact version to installlatestinstalls latest version$terraenvterraforminstall0.12.15$terraenvterragruntinstall0.21.6$terraenvterraforminstalllatest$terraenvterragruntinstalllatestterraenv < terraform / terragrunt > list remote.terraenvIf you use a.terraenv,terraenv <terraform / terragrunt > install(no argument) will install the version written in it.terraenv <terraform/terragrunt> use <version>Switch a version to use$terraenvterraformuse0.11.14$terraenvterragruntuse0.21.6terraenv uninstall <terraform/terragrunt> <version>Uninstall a specific version of Terraform$terraenvterraformuninstall0.12.15$terraenvterragruntuninstall0.21.5terraenv <terraform/terragrunt> list localList installed versions%terraenvterraformlistlocal0.120.11.130.11.140.12.110.12.00.12.120.12.13%terraenvterragruntlistlocal0.18.70.21.6terraenv <terraform/terragrunt> list remoteList installable versions%terraenvterraformlistremote...0.11.30.11.40.11.50.11.60.11.70.11.80.11.90.11.100.11.110.11.120.11.130.11.140.12.00.12.10.12.20.12.30.12.40.12.50.12.60.12.70.12.80.12.90.12.100.12.110.12.120.12.130.12.140.12.15.terraenv fileIf you put a.terraenvfile on your project root, terraenv detects it and uses the version written in it.$cat.terraenvTERRAFORM=0.12.15TERRAGRUNT=0.21.6$terraenvterraforminstall$terraform-versionTerraform v0.12.15$terraenvterragruntinstall$terragrunt-versionterragrunt version v0.21.6To use Terraform or Terragrunt version from `.terraenv` file present at your current directory path.$terraenvterraformuse$terraenvterragruntuseLICENSEterraenvrbenvInspirationtfenvtgenvrbenv
Package: terrafai
Terrafai: Supercharge Your Terraform Projects with GPT-4Terrafai is an open-source CLI tool that allows you to edit an entire Terraform project directory with GPT-4, the LLM behind ChatGPT. Make sweeping changes at once:Refactor an entire projectChange resource naming conventionsApply your company's latest resource tagging standardsAnything ChatGPT can do, but at the project levelFeatures🤖 GPT-4 Integration: Utilize the power of OpenAI's GPT-4 to manipulate your Terraform configurations.⚙️ Automated Checks: Pre- and post-checks with 'terraform validate' to ensure quality.🔄 Diff Output: Visualize changes before they're made.🛠️ Flexible Operations: Specify any bulk operations. Will be passed into prompt template.All changes will be placed into a timestamped subdirectory of your current project.Many improvements to come!PrerequisitesOpenAI API Key with GPT-4 enabled (https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4)Terraform installed: The CLI tool interacts with Terraform project directoriesInstallationpip install terrafaiFinally, add your OpenAI API Key to your environment variables:export OPENAI_API_KEY='your-api-key-here'UsageBasic usage:terrafai -op "Append '-demo' to all resource names."ContributingContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.Fork the projectCreate your feature branch (git checkout -b feature/AmazingFeature)Commit your changes (git commit -m 'Add some AmazingFeature')Push to the branch (git push origin feature/AmazingFeature)Open a pull request
Package: terraformation
A simple Terraform wrapper to use variable definition files if they match the
workspace name.RationaleWith workspaces, one can use the same module in different environments with
minor changes like different domain name, size of a cluster, instance type.
One can use variable definition files to store the values for each workspace in
a dedicated file. This wrapper replaces the following:terraformworkspaceselectprodterraformplan-var-files=prod.tfvars-outtfplanto:terraformworkspaceselectprodtfplan-outtfplanInstallationpython3-mpipinstallterraformationThe wrapper is a single Python3 script with no external dependencies. If you
prefer, you can download thetf.pyand use that instead.UsageReplaceterraformwithtf. In case there’s a variable
definitions file (that ends with.tfvars) that matches the current
workspace name (if the current workspace name isprodand a file namedprod.tfvarsexists) than a-var-file=prod.tfvarsargument is
added to the relevant commands (likeplanandimport). All
other arguments are kept as they were. Similarly, if a directory exists with
the same name as the workspace, for all the files inside that directory that
end with.tfvars, a-var-fileargument is added. For example:-var-file=prod/a.tfvarsand-var-file=prod/b.tfvars.By defaulttfinvokesterraform, but if you’re using a
different tool (likeOpenTofuyou can set theTF_CLIenvironment variable to that tool name. If you wish to know the
exact commandtfis running set theTF_DEBUGenvironment
variable to1and the command will printed before the it’s invoked.LicenseThis software is licensed under the MIT license (see theLICENSE.txtfile).AuthorNimrod Adar,contact meor visit mywebsite. Patches are welcome viagit send-email. The repository is located
at:https://git.shore.co.il/nimrod/.
Package: terraform-aws-icons
CombineTerraform graphandAWS Icons.Usagepip install terraform-aws-icons
terraform graph | terraform-iconify | dot -Tpng > graph.pngExamplesBased on output fromhttps://github.com/hashicorp/terraform/tree/master/examples:aws-asg.dot:aws-rds.dot:LicenseAWS icons are included with permission from Amazon Web Services.
Package: terraform-cloud-client
Terraform Cloud ClientAn API client for HashiCorp's Terraform CloudInstallation$ pip install terraform-cloud-clientThis client is only tested on python 3.7Usage as a librarySet up:>>>importtfc>>>client=tfc.TerraformClient("my_api_token","my_organization","my_workspace")Get Terraform variables:>>>variables=client.get_variables()>>>variables{'my_username':<TerraformVariableid='var-someid1',name='my_username',value='john_doe'>,'my_password':<TerraformVariableid='var-someid2',name='my_password',sensitive>,}>>>username_variable=variables['my_username']>>>username_variable.id'var-someid1'>>>username_variable.name'my_username'>>>username_variable.value'john_doe'Change the value of a variable:>>>client.update_variable(variable_id=username_variable.id,new_value='jane_doe')Trigger a run:>>>run=client.create_run('My message')>>>run.id'run-someid'>>>run.url# Go here in a web browser to view the run'https://app.terraform.io/app/my_organization/workspaces/my_workspace/runs/run-someid'Usage as a command line toolInstalling this via pip also installs atfccommand line tool$ tfc --help
usage: tfc [-h] [--message MESSAGE]
           organization workspace [name=value [name=value ...]]

Trigger a Terraform Cloud run

positional arguments:
  organization          The name of your organization in Terraform Cloud
  workspace             The name of your workspace in Terraform Cloud
  name=value            Set terraform variable NAME to VALUE before creating
                        the run

optional arguments:
  -h, --help            show this help message and exit
  --message MESSAGE, -m MESSAGE
                        The message to be associated with this run

Put your API token in the TERRAFORM_CLOUD_TOKEN environment variableSo for example:$ tfc my_organization my_workspace foo=baz --message="Reticulating splines"
Updated 'foo' from 'bar' to 'baz'
Created run run-g6SmSsLVKg71yeNw - check status at: https://app.terraform.io/app/my_organization/workspaces/my_workspace/runs/run-g6SmSsLVKg71yeNwThe message argument can contain variables which are expanded at runtime. These follow the same
formatting rules as Python'sstr.format(...). The variables which are currently defined are:git_repositorygit_branchgit_commit_subjectgit_commit_authorSo for example:$ tfc my_organization my_workspace foo=baz --message="{git_commit_subject} (author: {git_commit_author}, branch: {git_branch}, repo: {git_repository})"might create a run with the message:My commit message (author: Joe Bloggs, branch: my-branch, repo: terraform-cloud-client)
Package: terraformer
terraformerterraformer is a Python wrapper around the Terraform CLI.UsageQuick Startterraformer usage centers around the Workspace object, which can be used to run the typical Terraform commands in that workspace. Just like with the CLI you have to initialize the workspace before you can run plans or applies.fromterraformerimportWorkspaceworkspace=Workspace(path="./")workspace.init()results,plan=workspace.plan()if!results.successful:raiseException(f"Terraform run failed without output:{results.stdout}")ifplan.deletions>0:raiseException("Deletions not expected from this plan")results,apply_log=workspace.apply(plan_path=plan.plan_path,auto_approve=True)if!results.successful:print("Terraform Apply was not successful.")forresource_name,resource_datainapply_log.resources.items():print(f"${resource_name}: ${resource['message']}")foroutput_name,output_datainapply_log.outputs.items():print(f"{output_name}:\n")print(yaml.dumps(output_data))print("\n\n\n")The plan step can be skipped if you are auto approving.fromterraformerimportWorkspaceworkspace=Workspace(path="./")workspace.init()results,apply_log=workspace.apply(auto_approve=True)There is also the capability to parse an existing plan JSON and create a plan object with the sensitive and unknown attributes sanitized
in the output.importjsonplan_from_json=TerraformPlan("","tests/terraform/plans/sensitive_plan.json",False)foraddress,resource_changeinplan_from_json.changes:print(f"address:{address}\n")print("before:\n")print(json.dumps(resource_change.before_sanitized))print("\nafter:\n")print(json.dumps(resource_change.after_sanitized))Installationterraformer can be installed with pip.pipinstallterraformerIn addition to terraformer you should have the Terraform binary installed on your system.
Package: terraform-executor
Python wrapper for Terraform binaryThis is a Python wrapper for Hashicorp's Terraform. Usingterraform-binaryyou can install Terraform using Pipenv or Pip, instead of manually downloading, unzipping and installing it.Usagepipenvinstallterraform-binary

terraforminit# Now you can use terraform, after you installed it with Pipenv or Pip.Build wheelWorks only on Mac/Linux for distributing since we need to set the execution rights of the binaries properly. Windows doesnt allow this.build-wheel.shLicenseThis project isApache License Version 2.0.
Package: terraform-installer
Terraform Installer [terraform-installer, ti]command line installer for the open source version ofterraformtiis still in the early stages of development. it has been tested in the following platforms:Ubuntu Linux ARM
Ubuntu Linux amd64
Darwin amd64
Windows10 amd64Installationpip install terraform-installerUsage# show help and exit  
ti -h  

# install or upgrade, attempt to figure out the platform  
# this is still experimental on most platforms  
ti  

# install or upgrade specific platform  
ti darwin_amd64  

# install a specific release of given platform  
ti darwin_amd64 -r 0.12.1  

# example for CI/CD
# -y skips the yes/no prompt, and -d specifies an install destination
ti linux_amd64 -y -d /usr/local/bin/
Package: terraform-named-cloudflare
terraform-named-cloudflarePython module and tool to easily convert Bind9 (named) zones into Terraform
CloudFlare provider records definitions.This module parses Bind9 (named) zone file and generates Terraform code with
CloudFlare resources definitions.To make the result code organized, code separated based on DNS records types.InstallationProductionThe simplest way to install the module is to use PIP:pipinstallterraform-named-cloudflareDevelopmentTo install the module from sources, just clone the repository and install the
module:gitclonehttps://github.com/pa-yourserveradmin-com/terraform-named-cloudflare.gitcdterraform-named-cloudflare
python3setup.pyinstallUsageExample usage scenario is the next:terraform-named-cloudflare\--file<NAMED_ZONE_FILE>\--zone-id<CLOUDFLARE_ZONE_ID>\--zone-name<CLOUDFLARE_ZONE_NAME>Where:NAMED_ZONE_FILE- the absolute or relative path to zone file in Bind9 (named)
format.CLOUDFLARE_ZONE_ID- the optional CloudFlare zone ID (can be found in CloudFlare
WEB interface).CLOUDFLARE_ZONE_NAME- the optional CloudFlare zone name (the same as domain
name).Since not all records need to be converted in Terraform code, the script ignores
some of them and just prints ignored records to standard output to provide ability
review them and add manually.RequirementsThere are no specific requirements except a few weel-known and widelly used Python
modules listed in therequirements.txtand automatically
installed with module.LimitationsThe module does not understand DNS RRD records and always will create only one
resource with the same name. The rest will be ignored and printed to standard
output for review and manual changes in Terraform code.Supported DNS records typesCurrently this module supports the next types of DNS records:AAAAACNAMEMXSRVTXTOther types of DNS records can be added based on the need. Also, contrinutions
are always welcome.
Package: terraform-parser
terraform-parserParse Terraform scripts into JSONStatusDec 2022- This an experimental parser that can parse HCL2ProblemI am uncertain if configuration/template language, such as Terraform, should include scripting.  It is beneficial to have a simple configuration, albeit redundant, for VCS tracking and simple diff for merge reviews.I would advocate a high level langauge (HLL), like Python, be used to produce the Terraform configuration with both HLL and Terraform be included in the repository. HLL is familiar, and the Terraform changes are easy to review.Using an HLL for Terraform generation removes the need for thequirky template expressions, complex expressions, and modules.The hope is toparse terraform into Json datamerge data from different terraform to single specallow Python to modify data easilywrite out terraform (in diff-friendly way)ReferencesLook at what is done here -https://github.com/starhawking/python-terrascriptExisting parser forHCL1Existing parser forHCL2Unicode Identifiers -UAX31Terraform Spec[Diagram terraform](https://diagrams.mingrammer.com/docs/getting-started/installationGraphviz