Skip to main content

cloud-detect

PyPI - Python Version PyPI PyPI - License Build Status

About

cloud-detect is a Python module that determines a host's cloud provider. Highly inspired by the Go based Satellite, cloud-detect uses the same techniques (file systems and provider metadata) to properly identify cloud providers.

Features

  • Supports identification of AWS, GCP, Azure and Digital Ocean hosts.
  • Supports skipping providers identification.
  • Logging integration.
  • Small and extensible.

Usage

>>> from cloud_detect import provider
>>> provider()
'aws'
>>> provider(excluded='aws')
'unknown'

Right now the only possible responses are: 'aws', 'gcp', 'do', 'azure' or 'unknown'

Installation

Via pip:

pip install cloud-detect

Examples

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.

How to contribute

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
  3. Write a test which shows that the bug was fixed or that the feature works as expected.
  4. Send a pull request and bug me until it gets merged and published.

Some things that would be great to have:

  • Add cloud providers (Vultr, Oracle)
  • Add codecov

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloud-detect-0.0.4.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloud_detect-0.0.4-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file cloud-detect-0.0.4.tar.gz.

File metadata

  • Download URL: cloud-detect-0.0.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.4.8

File hashes

Hashes for cloud-detect-0.0.4.tar.gz
Algorithm Hash digest
SHA256 14fedb7316f5704c1d338e46dd326043077c7bf0ea8e0c6f68ad366a0dcbd6da
MD5 73e8b5c7215dd4ecc0a0d78e007c0649
BLAKE2b-256 ff5d7285fed78b5e8f19456a002598d6b50d6bc267134b2da0d8fc98b8cc2f51

See more details on using hashes here.

File details

Details for the file cloud_detect-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: cloud_detect-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.4.8

File hashes

Hashes for cloud_detect-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 07ac59e9a2dc95ff847c5377d863b7dc9b8c98b8089f703a959435864c4f0e6d
MD5 e554b924b1d1af941ab77db11c33bbd7
BLAKE2b-256 35c1fb1b099cbe94afef6eb4d197d9243d48424d0ab10a9cbf5add05dc0eeee0

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

This release

0.0.4 This release

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page