-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.html
More file actions
53 lines (49 loc) · 4.06 KB
/
utils.html
File metadata and controls
53 lines (49 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module utils</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>utils</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/fatemeh/src/2019/Doxygen/utils.py">/home/fatemeh/src/2019/Doxygen/utils.py</a></font></td></tr></table>
<p><tt>Helper functions</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="re.html">re</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-check_phone"><strong>check_phone</strong></a>(phone)</dt></dl>
<dl><dt><a name="-coach_pay"><strong>coach_pay</strong></a>(coach)</dt></dl>
<dl><dt><a name="-coach_points"><strong>coach_points</strong></a>(coach)</dt></dl>
<dl><dt><a name="-coach_stats"><strong>coach_stats</strong></a>(coach)</dt></dl>
<dl><dt><a name="-del_cache"><strong>del_cache</strong></a>(key)</dt><dd><tt>Delete a value from cache</tt></dd></dl>
<dl><dt><a name="-get_cache"><strong>get_cache</strong></a>(key)</dt><dd><tt>Get an item from cache</tt></dd></dl>
<dl><dt><a name="-get_verification_code"><strong>get_verification_code</strong></a>()</dt><dd><tt>Generate a random verification code</tt></dd></dl>
<dl><dt><a name="-jwt_auth"><strong>jwt_auth</strong></a>(request)</dt><dd><tt>Decode a request object's JWT</tt></dd></dl>
<dl><dt><a name="-jwt_decode"><strong>jwt_decode</strong></a>(inp)</dt><dd><tt>Decode a JWT into a dic</tt></dd></dl>
<dl><dt><a name="-jwt_encode"><strong>jwt_encode</strong></a>(dic)</dt><dd><tt>Encode a dic into a JWT</tt></dd></dl>
<dl><dt><a name="-package_pay"><strong>package_pay</strong></a>(package)</dt></dl>
<dl><dt><a name="-send_call"><strong>send_call</strong></a>(phone, key)</dt><dd><tt>Sends a verification call to phone number</tt></dd></dl>
<dl><dt><a name="-send_msg"><strong>send_msg</strong></a>(phone)</dt><dd><tt>Set a password and send it to user</tt></dd></dl>
<dl><dt><a name="-send_sms"><strong>send_sms</strong></a>(phone, key)</dt><dd><tt>Sends a verification sms to phone number</tt></dd></dl>
<dl><dt><a name="-set_cache"><strong>set_cache</strong></a>(key, value, timeout=600)</dt><dd><tt>Set an item in cache</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>PERCENTLIMIT</strong> = 70<br>
<strong>PHONE_REGEX</strong> = re.compile('^(0|\\+98)?9\\d{9}$')<br>
<strong>USE_KAVE_NEGAR</strong> = True</td></tr></table>
</body></html>