Module that determines a host's cloud provider
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.
- Supports identification of AWS, GCP, Azure and Digital Ocean hosts.
- Supports skipping providers identification.
- Logging integration.
- Small and extensible.
>>> from cloud_detect import provider >>> provider() 'aws' >>> provider(excluded='aws') 'unknown'
Right now the only possible responses are: 'aws', 'gcp', 'do', 'azure' or 'unknown'
pip install cloud-detect
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
- Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
- Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
- Write a test which shows that the bug was fixed or that the feature works as expected.
- 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 the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size cloud_detect-0.0.4-py3-none-any.whl (7.3 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size cloud-detect-0.0.4.tar.gz (3.8 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for cloud_detect-0.0.4-py3-none-any.whl