{"id":13585042,"url":"https://github.com/dgzlopes/cloud-detect","last_synced_at":"2025-03-23T22:33:10.789Z","repository":{"id":38803108,"uuid":"200218867","full_name":"dgzlopes/cloud-detect","owner":"dgzlopes","description":"Module that determines a host's cloud provider.","archived":false,"fork":false,"pushed_at":"2024-03-21T14:37:28.000Z","size":40,"stargazers_count":35,"open_issues_count":4,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-22T01:12:55.282Z","etag":null,"topics":["agnostic","aws","azure","cloud","detect","devops","digitalocean","gcp","metadata","multicloud","python3","vendoring"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/cloud-detect/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgzlopes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-02T10:52:38.000Z","updated_at":"2024-04-20T06:43:05.000Z","dependencies_parsed_at":"2022-07-14T04:20:36.088Z","dependency_job_id":"e455c8ac-d347-430e-bd01-0dbae6728c46","html_url":"https://github.com/dgzlopes/cloud-detect","commit_stats":{"total_commits":30,"total_committers":8,"mean_commits":3.75,"dds":"0.30000000000000004","last_synced_commit":"23fa390d74d7ee435801105f29f625a2ac4907bc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgzlopes%2Fcloud-detect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgzlopes%2Fcloud-detect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgzlopes%2Fcloud-detect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgzlopes%2Fcloud-detect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgzlopes","download_url":"https://codeload.github.com/dgzlopes/cloud-detect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221919602,"owners_count":16901811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agnostic","aws","azure","cloud","detect","devops","digitalocean","gcp","metadata","multicloud","python3","vendoring"],"created_at":"2024-08-01T15:04:42.298Z","updated_at":"2024-10-28T19:34:41.199Z","avatar_url":"https://github.com/dgzlopes.png","language":"Python","readme":"# cloud-detect\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cloud-detect.svg)](https://pypi.org/project/cloud-detect/)\n[![PyPI](https://img.shields.io/pypi/v/cloud-detect.svg)](https://pypi.org/project/cloud-detect/)\n[![PyPI - License](https://img.shields.io/pypi/l/cloud-detect.svg)](https://github.com/dgzlopes/cloud-detect/blob/master/LICENSE.md)\n[![Build Status](https://github.com/dgzlopes/cloud-detect/workflows/Testing%20for%20Python%20Versions%203.6-3.11%20via%20tox/badge.svg)](https://github.com/dgzlopes/cloud-detect/actions?query=workflow%3A%22Testing+for+Python+Versions+3.6-3.11+via+tox%22)\n\n## About\n`cloud-detect` is a Python module that determines a host's cloud provider. Highly inspired by the Go based [Satellite](https://github.com/banzaicloud/satellite), `cloud-detect` uses the same techniques (file systems and provider metadata) to properly identify cloud providers.\n\n## Features\n- Supports identification of Alibaba, AWS, Azure, Digital Ocean, GCP, Oracle Cloud and Vultr hosts.\n- Fast and supports asyncio\n- Logging integration.\n- Small and extensible.\n\n## Usage\n\n```\n\u003e\u003e\u003e from cloud_detect import provider\n\u003e\u003e\u003e provider()\n'aws'\n\n\u003e\u003e\u003e provider() # when tested in local/non-supported cloud env\n'unknown'\n```\n\n\u003e Right now the only possible responses are: 'alibaba', 'aws', 'azure', 'do', 'gcp', 'oci', 'vultr' or 'unknown'\n\n\u003e You can get the list of supported providers using\n\u003e\u003e`\u003e\u003e\u003e from cloud_detect import SUPPORTED_PROVIDERS`\n\n## Installation\nVia pip:\n```\npip install cloud-detect\n```\n\n## Examples\n[Termination-handler](https://github.com/dgzlopes/termination-handler) uses cloud-detect to keep the handling of termination notices on spot/preemptible instances cloud-agnostic, making easier to operate the same tooling in various distinct environments.\n\n## How to contribute\n1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.\n2. Fork [the repository](https://github.com/dgzlopes/cloud-detect) on GitHub to start making your changes to the master branch (or branch off of it).\n3. Write a test which shows that the bug was fixed or that the feature works as expected.\n4. Send a [pull request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork) and bug [me](https://github.com/dgzlopes) until it gets merged and published.\n\nSome things that would be great to have:\n- Add more cloud providers\n- Add codecov\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgzlopes%2Fcloud-detect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgzlopes%2Fcloud-detect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgzlopes%2Fcloud-detect/lists"}