Coverage for src/couchers/constants.py: 100%
15 statements
« prev ^ index » next coverage.py v7.5.0, created at 2024-12-29 01:26 +0000
« prev ^ index » next coverage.py v7.5.0, created at 2024-12-29 01:26 +0000
1from datetime import datetime, timedelta
3import pytz
5# terms of service version
6TOS_VERSION = 2
8# community guidelines version
9GUIDELINES_VERSION = 1
11EMAIL_REGEX = r"^[0-9a-z][0-9a-z\-\_\+\.]*@([0-9a-z\-]+\.)*[0-9a-z\-]+\.[a-z]{2,}$"
13# expiry time for a verified phone number
14PHONE_VERIFICATION_LIFETIME = timedelta(days=2 * 365)
16# shortest period between phone verification code requests
17PHONE_REVERIFICATION_INTERVAL = timedelta(days=2)
19# expiry time for an sms code
20SMS_CODE_LIFETIME = timedelta(hours=24)
22# max attempts to enter the sms code
23SMS_CODE_ATTEMPTS = 3
25SIGNUP_EMAIL_TOKEN_VALIDITY = timedelta(hours=48)
27DATETIME_MINUS_INFINITY = pytz.UTC.localize(datetime(1, 1, 1))
28DATETIME_INFINITY = pytz.UTC.localize(datetime(9876, 12, 31, hour=23, minute=59, second=59))
30SERVER_THREADS = 128
32WORKER_THREADS = 1
34# how long the user has to undelete their account
35UNDELETE_DAYS = 7