diff options
| author | NW/RL <NWRL@dabikers.online> | 2024-03-29 16:12:28 -0500 |
|---|---|---|
| committer | NW/RL <NWRL@dabikers.online> | 2024-03-29 16:12:28 -0500 |
| commit | f6732f692d463f238fc0d645017cc5628e87a68a (patch) | |
| tree | 576823fb2434e92d5312b343e38cb7673b6f123c /steamrelationships/constants.py | |
| parent | ab4bd819ff8a918c7892b94884aabbbcd65f7a42 (diff) | |
Do some work on limiting requests
Diffstat (limited to 'steamrelationships/constants.py')
| -rw-r--r-- | steamrelationships/constants.py | 12 |
1 files changed, 12 insertions, 0 deletions
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 @@ | |||
| 1 | # God I fucking love python and the shit workarounds it requires for something as simple as a constant variable | ||
| 2 | def constant(f): | ||
| 3 | def fset(self, value): | ||
| 4 | raise TypeError | ||
| 5 | def fget(self): | ||
| 6 | return f() | ||
| 7 | return property(fget, fset) | ||
| 8 | |||
| 9 | class _Const(object): | ||
| 10 | @constant | ||
| 11 | def STEAMAPI_MAXREQ() -> int: | ||
| 12 | return 100000 \ No newline at end of file | ||
