mirror of
https://github.com/dcarrillo/digaws.git
synced 2025-07-05 12:39:26 +00:00
Compare commits
9 Commits
61970f6679
...
1.0.6
Author | SHA1 | Date | |
---|---|---|---|
e5685511ba
|
|||
d1d01b242c
|
|||
e2f0f4f63c
|
|||
b657c4a4d3
|
|||
87618a960d
|
|||
b1f48d5534
|
|||
ca98c678b2 | |||
5b58df2b3a
|
|||
ad80450442
|
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
@ -14,12 +14,12 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
python-version: [3.7, 3.8, 3.9]
|
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
@ -41,12 +41,12 @@ jobs:
|
|||||||
needs: tests
|
needs: tests
|
||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python 3.8
|
- name: Set up Python 3.11
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.11
|
||||||
|
|
||||||
- name: Install tools
|
- name: Install tools
|
||||||
run: |
|
run: |
|
||||||
|
18
README.md
18
README.md
@ -1,22 +1,30 @@
|
|||||||
# digaws
|
# digaws
|
||||||
|
|
||||||
The digaws lookup tool displays information for a given IP address (v4 o v6) or a CIDR, sourced from the AWS official IP ranges.
|
The digaws lookup tool displays information for a given IP address (both v4 and v6) or a CIDR, sourced from the AWS official IP ranges.
|
||||||
In order to save bandwidth and time this tool requests the [AWS IP ranges](https://ip-ranges.amazonaws.com/ip-ranges.json) and keeps
|
In order to save bandwidth and time this tool requests the [AWS IP ranges](https://ip-ranges.amazonaws.com/ip-ranges.json) and keeps
|
||||||
a cached version until a new version is published.
|
a cached version until a new version is published.
|
||||||
|
|
||||||

|
[](https://pypi.org/project/digaws/)
|
||||||

|
[](https://github.com/dcarrillo/digaws/actions)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
Python >= 3.7
|
Python >= 3.8
|
||||||
|
|
||||||
Tests are verified on Linux, macos and Windows.
|
Tests are verified on Linux, macos and Windows.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
### Using [pipx](https://pypa.github.io/pipx/#install-pipx) (this is the preferred way)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install digaws
|
pipx install digaws
|
||||||
|
```
|
||||||
|
|
||||||
|
### Using pip
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install digaws --user
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
__version__ = '1.0.4'
|
__version__ = '1.0.6'
|
||||||
__description__ = 'Look up canonical information for AWS IP addresses and networks'
|
__description__ = 'Look up canonical information for AWS IP addresses and networks'
|
||||||
|
@ -181,7 +181,7 @@ class DigAWS():
|
|||||||
data = [prefix for prefix in self.ipv6_prefixes
|
data = [prefix for prefix in self.ipv6_prefixes
|
||||||
if addr.subnet_of(prefix['ipv6_prefix'])]
|
if addr.subnet_of(prefix['ipv6_prefix'])]
|
||||||
except (ipaddress.AddressValueError, ValueError):
|
except (ipaddress.AddressValueError, ValueError):
|
||||||
raise(ValueError(f'Wrong IP or CIDR format: {address}'))
|
raise ValueError(f'Wrong IP or CIDR format: {address}')
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
2
setup.py
2
setup.py
@ -25,7 +25,7 @@ setup(
|
|||||||
'License :: OSI Approved :: Apache Software License',
|
'License :: OSI Approved :: Apache Software License',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
],
|
],
|
||||||
python_requires='>=3.7',
|
python_requires='>=3.8',
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': ['digaws=digaws.digaws:main']
|
'console_scripts': ['digaws=digaws.digaws:main']
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user