aboutsummaryrefslogtreecommitdiffstats
path: root/useragents/src/registry.py
diff options
context:
space:
mode:
Diffstat (limited to 'useragents/src/registry.py')
-rw-r--r--useragents/src/registry.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/useragents/src/registry.py b/useragents/src/registry.py
new file mode 100644
index 0000000..1ea9607
--- /dev/null
+++ b/useragents/src/registry.py
@@ -0,0 +1,11 @@
+class AgentRegistry:
+ def __init__(self):
+ self.registry = {}
+
+ def __call__(self, func):
+ self.registry[func.__name__] = func
+ print(f"Registered agent: {func.__name__}")
+ return func
+
+
+agentRegistry = AgentRegistry()