chg: Bump deps
parent
bec940cba0
commit
268781d4eb
File diff suppressed because it is too large
Load Diff
|
@ -25,28 +25,28 @@ ssfetcher = "bin.ssfetcher:main"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8.1"
|
python = "^3.8.1"
|
||||||
redis = {version = "^4.4.0", extras = ["hiredis"]}
|
redis = {version = "^4.5.1", extras = ["hiredis"]}
|
||||||
flask-restx = "^1.0.3"
|
flask-restx = "^1.0.6"
|
||||||
gunicorn = "^20.1.0"
|
gunicorn = "^20.1.0"
|
||||||
python-dateutil = "^2.8.2"
|
python-dateutil = "^2.8.2"
|
||||||
pyipasnhistory = "^2.1.2"
|
pyipasnhistory = "^2.1.2"
|
||||||
pycountry = "^22.3.5"
|
pycountry = "^22.3.5"
|
||||||
beautifulsoup4 = "^4.11.1"
|
beautifulsoup4 = "^4.11.2"
|
||||||
aiohttp = "^3.8.3"
|
aiohttp = "^3.8.4"
|
||||||
Bootstrap-Flask = "^1.8.0"
|
Bootstrap-Flask = "^1.8.0"
|
||||||
pid = "^3.0.4"
|
pid = "^3.0.4"
|
||||||
pybgpranking2 = "^2.0.1"
|
pybgpranking2 = "^2.0.1"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
ipython = "^8.8.0"
|
ipython = "^8.10.0"
|
||||||
mypy = "^0.991"
|
mypy = "^1.0.0"
|
||||||
types-setuptools = "^65.6.0.3"
|
types-setuptools = "^67.3.0.1"
|
||||||
types-redis = "^4.4.0.0"
|
types-redis = "^4.5.1.1"
|
||||||
types-requests = "^2.28.11.7"
|
types-requests = "^2.28.11.13"
|
||||||
types-python-dateutil = "^2.8.19.5"
|
types-python-dateutil = "^2.8.19.7"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core>=1.0.0"]
|
requires = ["poetry-core>=1.2"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
|
|
|
@ -75,7 +75,7 @@ def country():
|
||||||
@app.route('/country_history_callback', methods=['GET', 'POST'])
|
@app.route('/country_history_callback', methods=['GET', 'POST'])
|
||||||
def country_history_callback():
|
def country_history_callback():
|
||||||
history_data: Dict[str, Tuple[str, str, List[Any]]]
|
history_data: Dict[str, Tuple[str, str, List[Any]]]
|
||||||
history_data = request.get_json(force=True) # type: ignore
|
history_data = request.get_json(force=True)
|
||||||
to_display = []
|
to_display = []
|
||||||
mapping: Dict[str, Any] = defaultdict(dict)
|
mapping: Dict[str, Any] = defaultdict(dict)
|
||||||
dates = []
|
dates = []
|
||||||
|
|
|
@ -65,7 +65,7 @@ class ASNRank(Resource):
|
||||||
def post(self):
|
def post(self):
|
||||||
# TODO
|
# TODO
|
||||||
# * Filter on date => if only returning one descr, return the desription at that date
|
# * Filter on date => if only returning one descr, return the desription at that date
|
||||||
query: Dict[str, Any] = request.get_json(force=True) # type: ignore
|
query: Dict[str, Any] = request.get_json(force=True)
|
||||||
to_return: Dict[str, Union[str, Dict[str, Any]]] = {'meta': query, 'response': {}}
|
to_return: Dict[str, Union[str, Dict[str, Any]]] = {'meta': query, 'response': {}}
|
||||||
if 'asn' not in query:
|
if 'asn' not in query:
|
||||||
to_return['error'] = f'You need to pass an asn - {query}'
|
to_return['error'] = f'You need to pass an asn - {query}'
|
||||||
|
@ -100,7 +100,7 @@ class ASNDescription(Resource):
|
||||||
|
|
||||||
@api.doc(body=asn_descr_fields)
|
@api.doc(body=asn_descr_fields)
|
||||||
def post(self):
|
def post(self):
|
||||||
query: Dict = request.get_json(force=True) # type: ignore
|
query: Dict = request.get_json(force=True)
|
||||||
to_return: Dict[str, Union[str, Dict[str, Any]]] = {'meta': query, 'response': {}}
|
to_return: Dict[str, Union[str, Dict[str, Any]]] = {'meta': query, 'response': {}}
|
||||||
if 'asn' not in query:
|
if 'asn' not in query:
|
||||||
to_return['error'] = f'You need to pass an asn - {query}'
|
to_return['error'] = f'You need to pass an asn - {query}'
|
||||||
|
@ -126,7 +126,7 @@ class ASNHistory(Resource):
|
||||||
|
|
||||||
@api.doc(body=asn_history_fields)
|
@api.doc(body=asn_history_fields)
|
||||||
def post(self):
|
def post(self):
|
||||||
query: Dict = request.get_json(force=True) # type: ignore
|
query: Dict = request.get_json(force=True)
|
||||||
to_return: Dict[str, Union[str, Dict[str, Any]]] = {'meta': query, 'response': {}}
|
to_return: Dict[str, Union[str, Dict[str, Any]]] = {'meta': query, 'response': {}}
|
||||||
if 'asn' not in query:
|
if 'asn' not in query:
|
||||||
to_return['error'] = f'You need to pass an asn - {query}'
|
to_return['error'] = f'You need to pass an asn - {query}'
|
||||||
|
@ -151,7 +151,7 @@ class CountryHistory(Resource):
|
||||||
|
|
||||||
@api.doc(body=coutry_history_fields)
|
@api.doc(body=coutry_history_fields)
|
||||||
def post(self):
|
def post(self):
|
||||||
query: Dict = request.get_json(force=True) # type: ignore
|
query: Dict = request.get_json(force=True)
|
||||||
to_return: Dict[str, Union[str, Dict[str, Any]]] = {'meta': query, 'response': {}}
|
to_return: Dict[str, Union[str, Dict[str, Any]]] = {'meta': query, 'response': {}}
|
||||||
to_return['response']['country_history'] = bgpranking.country_history(**query)['response'] # type: ignore
|
to_return['response']['country_history'] = bgpranking.country_history(**query)['response'] # type: ignore
|
||||||
return to_return
|
return to_return
|
||||||
|
@ -168,7 +168,7 @@ class ASNsGlobalRanking(Resource):
|
||||||
|
|
||||||
@api.doc(body=asns_global_ranking_fields)
|
@api.doc(body=asns_global_ranking_fields)
|
||||||
def post(self):
|
def post(self):
|
||||||
query: Dict = request.get_json(force=True) # type: ignore
|
query: Dict = request.get_json(force=True)
|
||||||
to_return: Dict[str, Union[str, Dict[str, Any]]] = {'meta': query, 'response': {}}
|
to_return: Dict[str, Union[str, Dict[str, Any]]] = {'meta': query, 'response': {}}
|
||||||
to_return['response'] = bgpranking.asns_global_ranking(**query)['response']
|
to_return['response'] = bgpranking.asns_global_ranking(**query)['response']
|
||||||
return to_return
|
return to_return
|
||||||
|
|
Loading…
Reference in New Issue