This commit is contained in:
sergey 2024-08-10 14:41:39 +03:00
commit 7a8f2ddd65
8 changed files with 2136 additions and 0 deletions

9
.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
!alembic
__pycache__
*.pyc
.env
.vscode/
.venv/
.log
.idea/
*.idea

0
README.md Normal file
View File

0
api/__init__.py Normal file
View File

0
core/__init__.py Normal file
View File

0
core/config.py Normal file
View File

16
main.py Normal file
View File

@ -0,0 +1,16 @@
import ipaddress
def main(ip: str) :
mask = [31, 30, 29, 28, 27, 26, 25, 24]
for i in mask:
net = ipaddress.ip_network(f'{ip}/{i}', strict=False)
print(net)
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
main('192.168.11.144')
# See PyCharm help at https://www.jetbrains.com/help/pycharm/

2087
poetry.lock generated Normal file

File diff suppressed because it is too large Load Diff

24
pyproject.toml Normal file
View File

@ -0,0 +1,24 @@
[tool.poetry]
name = "blocking-ip"
version = "0.1.0"
description = ""
authors = ["sergey <sergey@sm8255082.ru>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.12"
uvicorn = {extras = ["standard"], version = "^0.30.5"}
fastapi = "^0.112.0"
pydantic-settings = "^2.4.0"
sqlalchemy = {extras = ["asyncio"], version = "^2.0.32"}
poetry = "^1.8.3"
alembic = "^1.13.2"
[tool.poetry.group.dev.dependencies]
black = "^24.8.0"
pytest = "^8.3.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"