From f6732f692d463f238fc0d645017cc5628e87a68a Mon Sep 17 00:00:00 2001 From: NW/RL Date: Fri, 29 Mar 2024 16:12:28 -0500 Subject: Do some work on limiting requests --- steamrelationships/constants.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 steamrelationships/constants.py (limited to 'steamrelationships/constants.py') diff --git a/steamrelationships/constants.py b/steamrelationships/constants.py new file mode 100644 index 0000000..af35733 --- /dev/null +++ b/steamrelationships/constants.py @@ -0,0 +1,12 @@ +# God I fucking love python and the shit workarounds it requires for something as simple as a constant variable +def constant(f): + def fset(self, value): + raise TypeError + def fget(self): + return f() + return property(fget, fset) + +class _Const(object): + @constant + def STEAMAPI_MAXREQ() -> int: + return 100000 \ No newline at end of file -- cgit v1.2.3