aboutsummaryrefslogtreecommitdiffstats
path: root/pyproject.toml
diff options
context:
space:
mode:
authorGravatar mbaruh <[email protected]>2022-03-03 20:21:42 +0200
committerGravatar mbaruh <[email protected]>2022-07-16 02:29:27 +0300
commitddf0839661fa3863b82e6c68dfaa92103d05a252 (patch)
treecf570a129f2da2f3ce3e13f6a1143ab3ad152dd7 /pyproject.toml
parentAdd domain filtering (diff)
Add filter-type-specific settings
Pydantic is added to the bot's dependencies, allowing easily setting up settings that are specific to a filter type (e.g for domains). The data for those settings is loaded from the "additional_field" JSON field in the Filter table. This commit specifically adds an option to match a domain exactly, without matching subdomains. There are several benefits to using Pydantic: - Built-in serialization to, and de-serialization from JSON, which is useful for reading and writing to the DB. - Type validation on initialization. - By default ignores extra fields when de-serializing, which can prevent things breaking if the extra fields change.
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 241ec3e99..975b9b995 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -28,6 +28,7 @@ rapidfuzz = "2.0.7"
lxml = "4.9.1"
markdownify = "0.6.1"
more_itertools = "8.12.0"
+pydantic = "~=1.9"
python-dateutil = "2.8.2"
python-frontmatter = "1.0.0"
pyyaml = "6.0"