https://github.com/msoedov/cloud_ips
Cloud IP ranges / CIDR blocks used by all cloud service providers GCP/AWS/DO/Oracle/Azure
https://github.com/msoedov/cloud_ips
aws cidr cloud cloudflare gcp ip-address ip-address-ranges ip-range-check ip-ranges network-mask
Last synced: 4 months ago
JSON representation
Cloud IP ranges / CIDR blocks used by all cloud service providers GCP/AWS/DO/Oracle/Azure
- Host: GitHub
- URL: https://github.com/msoedov/cloud_ips
- Owner: msoedov
- Created: 2021-03-31T13:46:23.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-12T14:48:13.000Z (almost 5 years ago)
- Last Synced: 2025-03-25T10:51:15.358Z (11 months ago)
- Topics: aws, cidr, cloud, cloudflare, gcp, ip-address, ip-address-ranges, ip-range-check, ip-ranges, network-mask
- Language: Python
- Homepage:
- Size: 62.5 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# cloud_ips
Check if an IP address is in the ranges used by AWS/GCP/DO/Azure. It fast, microsecond based cloud providers lookup by public ip
## Features
- GCP / AWS / Digital ocean ip ranges support
- 1000x faster than a brute force lookup
- Most recent data records
- Fully typed with annotations and checked with `mypy`, [PEP561 compatible](https://www.python.org/dev/peps/pep-0561/)
- Easy to start: has lots of docs, tests, and tutorials
## Usage
```shell
pip install cloud_ips
```
```python
from cloud_ips.network import is_cloud
is_cloud("95.67.109.122")
>> False
```
### Benchmarks
```python
timeit.timeit(
'is_cloud("95.67.89.122")', "from __main__ import is_cloud", number=1000,
)
>> 0.04331268899999999
timeit.timeit(
'naive("95.67.89.122")', "from __main__ import naive", number=1000,
)
>> 3.5043050669999998
```