mirror of https://github.com/dcarrillo/digaws.git
Compare commits
11 Commits
Author | SHA1 | Date |
---|---|---|
Daniel Carrillo | e5685511ba | |
Daniel Carrillo | d1d01b242c | |
Daniel Carrillo | e2f0f4f63c | |
Daniel Carrillo | b657c4a4d3 | |
Daniel Carrillo | 87618a960d | |
Daniel Carrillo | b1f48d5534 | |
Daniel Carrillo | ca98c678b2 | |
Daniel Carrillo | 5b58df2b3a | |
Daniel Carrillo | ad80450442 | |
Daniel Carrillo | 61970f6679 | |
Daniel Carrillo | 613727ef5a |
|
@ -14,12 +14,12 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
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:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
|
@ -41,12 +41,12 @@ jobs:
|
|||
needs: tests
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v2
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.11
|
||||
|
||||
- name: Install tools
|
||||
run: |
|
||||
|
|
18
README.md
18
README.md
|
@ -1,22 +1,30 @@
|
|||
# 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
|
||||
a cached version until a new version is published.
|
||||
|
||||
![PyPI version](https://badge.fury.io/py/digaws.svg)
|
||||
![CI](https://github.com/dcarrillo/digaws/workflows/CI/badge.svg)
|
||||
[![PyPI version](https://badge.fury.io/py/digaws.svg)](https://pypi.org/project/digaws/)
|
||||
[![CI](https://github.com/dcarrillo/digaws/workflows/CI/badge.svg)](https://github.com/dcarrillo/digaws/actions)
|
||||
|
||||
## Requirements
|
||||
|
||||
Python >= 3.7
|
||||
Python >= 3.8
|
||||
|
||||
Tests are verified on Linux, macos and Windows.
|
||||
|
||||
## Install
|
||||
|
||||
### Using [pipx](https://pypa.github.io/pipx/#install-pipx) (this is the preferred way)
|
||||
|
||||
```bash
|
||||
pip install digaws
|
||||
pipx install digaws
|
||||
```
|
||||
|
||||
### Using pip
|
||||
|
||||
```bash
|
||||
pip install digaws --user
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
__version__ = '1.0.4'
|
||||
__version__ = '1.0.6'
|
||||
__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
|
||||
if addr.subnet_of(prefix['ipv6_prefix'])]
|
||||
except (ipaddress.AddressValueError, ValueError):
|
||||
raise(ValueError(f'Wrong IP or CIDR format: {address}'))
|
||||
raise ValueError(f'Wrong IP or CIDR format: {address}')
|
||||
|
||||
return data
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import nox
|
||||
|
||||
|
||||
nox.options.sessions = ['lint', 'typing', 'tests']
|
||||
locations = ['noxfile.py', 'setup.py', 'digaws/', 'tests/']
|
||||
|
||||
lint_common_args = ['--max-line-length', '120']
|
||||
mypy_args = ['--ignore-missing-imports']
|
||||
mypy_args = ['--ignore-missing-imports', '--install-types', '--non-interactive']
|
||||
|
||||
pytest_args = ['--cov=digaws', '--cov-report=', 'tests/']
|
||||
coverage_args = ['report', '--show-missing', '--fail-under=80']
|
||||
|
||||
|
|
Loading…
Reference in New Issue