8 Commits
1.0.4 ... 1.0.5

Author SHA1 Message Date
b657c4a4d3 Fix linting warning 2022-09-30 21:07:44 +02:00
87618a960d Update README.md to enforce the use of pipx for installing 2022-03-26 20:33:27 +01:00
b1f48d5534 Fix badges links at README.md 2021-12-26 12:05:22 +01:00
ca98c678b2 Merge pull request #8 from dcarrillo/add-3.10-tests
Add python 3.10 to the tests matrix
2021-12-24 12:54:31 +01:00
5b58df2b3a Fix workflow yaml 2021-12-24 12:46:57 +01:00
ad80450442 Add python 3.10 to the tests matrix 2021-12-24 12:45:01 +01:00
61970f6679 Merge pull request #7 from dcarrillo/fix-mypy
Install missing stubs for mypy
2021-07-01 19:55:08 +02:00
613727ef5a Install missing stubs for mypy 2021-07-01 19:51:08 +02:00
5 changed files with 18 additions and 8 deletions

View File

@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2

View File

@ -1,11 +1,11 @@
# 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
@ -15,8 +15,16 @@ 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

View File

@ -1,2 +1,2 @@
__version__ = '1.0.4'
__version__ = '1.0.5'
__description__ = 'Look up canonical information for AWS IP addresses and networks'

View File

@ -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

View File

@ -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']