mirror of
https://github.com/wahyd4/links.git
synced 2026-08-08 21:04:53 +10:00
- Rewrite nginxmon/geo.py to use maxminddb + DB-IP City Lite MMDB (https://cdn.jsdelivr.net/npm/dbip-city-lite/dbip-city-lite.mmdb.gz) instead of ip-api.com HTTP API — eliminates all network timeouts and rate-limit issues; lookups are now sub-millisecond in-process - Keep _lookup_batch() signature unchanged so routermon receiver requires no changes - MMDB downloaded on first use (lazy) and refreshed monthly via APScheduler; reader cached module-level (thread-safe for reads) - Add management command: manage.py download_geo_db - Update k8s init container to download MMDB on first deploy if absent - Add maxminddb==3.1.1 dependency CC BY 4.0 — DB-IP (https://db-ip.com) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
75 lines
1.5 KiB
TOML
75 lines
1.5 KiB
TOML
[project]
|
|
name = "links"
|
|
version = "0.1.1"
|
|
description = "A URL management tool"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"asgiref==3.8.1",
|
|
"Django>=5.2.9",
|
|
"django-widget-tweaks==1.5.0",
|
|
"sqlparse==0.5.1",
|
|
"django-tailwind==3.8.0",
|
|
"fontawesome-free==5.15.3",
|
|
"gunicorn==23.0.0",
|
|
"whitenoise==5.3.0",
|
|
"django-simplemde==0.1.4",
|
|
"markdown==3.8.1",
|
|
"requests>=2.32.4,<3",
|
|
"beautifulsoup4==4.12.3",
|
|
"djangorestframework==3.15.2",
|
|
"apscheduler>=3.10.0,<4.0.0",
|
|
"playwright>=1.40.0",
|
|
"boto3>=1.35.0",
|
|
"python-magic>=0.4.27",
|
|
"pillow~=12.2.0",
|
|
"whoosh==2.7.4",
|
|
"django-redis>=5.4.0",
|
|
"qdrant-client>=1.13.2",
|
|
"cryptography>=42.0.0",
|
|
"kubernetes>=29.0.0",
|
|
"maxminddb>=3.1.1",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["."]
|
|
|
|
[tool.hatch.metadata]
|
|
allow-direct-references = true
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=9.0.3",
|
|
"pytest-django>=4.5",
|
|
"black>=23.0",
|
|
"isort>=5.0",
|
|
"flake8>=6.0",
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 100
|
|
target-version = ["py312"]
|
|
include = '\.pyi?$'
|
|
|
|
[tool.pytest.ini_options]
|
|
DJANGO_SETTINGS_MODULE = "core.settings"
|
|
pythonpath = ["."]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
|
|
[tool.isort]
|
|
profile = "black"
|
|
multi_line_output = 3
|
|
line_length = 100
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=9.0.3",
|
|
"pytest-django>=4.10.0",
|
|
]
|