django-restit 4.2.123__py3-none-any.whl → 4.2.124__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {django_restit-4.2.123.dist-info → django_restit-4.2.124.dist-info}/METADATA +1 -1
- {django_restit-4.2.123.dist-info → django_restit-4.2.124.dist-info}/RECORD +6 -6
- inbox/utils/parsing.py +20 -0
- rest/__init__.py +1 -1
- {django_restit-4.2.123.dist-info → django_restit-4.2.124.dist-info}/LICENSE.md +0 -0
- {django_restit-4.2.123.dist-info → django_restit-4.2.124.dist-info}/WHEEL +0 -0
@@ -91,7 +91,7 @@ inbox/models/message.py,sha256=acPm2z0QsucoFFmfzPekehElZm8EMzkcGChX_BpzGLU,3758
|
|
91
91
|
inbox/models/template.py,sha256=i5vf0vsM1U0251UmVsF61MDCV_c7xt-zdCdx1SiKOG0,1013
|
92
92
|
inbox/rpc.py,sha256=7JXvpXlEGKG7by_NkANPGYLCzagyCnTIGM4rme_htpk,1534
|
93
93
|
inbox/utils/__init__.py,sha256=P_UR2rGK3L0tZNlTN-mf99tpeYM-tLkA18iDKXSSLDM,89
|
94
|
-
inbox/utils/parsing.py,sha256=
|
94
|
+
inbox/utils/parsing.py,sha256=cU5qHaVNkje21b3ApeCixYQEuCsQl0gM8FeLz9DPgs0,5340
|
95
95
|
inbox/utils/render.py,sha256=CU_F2qUBQE7mjb9Q6Dn9ro5CS_O_zEY-wDMHEClKkIA,4331
|
96
96
|
inbox/utils/sending.py,sha256=BKelTZnbkdSLGpjOY6IRTrzj-Hnw2pPZ7RYQGwe-tqk,2179
|
97
97
|
incident/README.md,sha256=4vbZTJj7uUmq8rogYngxqNYjFTlBOujfWUGheLoFKMc,1114
|
@@ -374,7 +374,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
|
|
374
374
|
rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
|
375
375
|
rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
|
376
376
|
rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
|
377
|
-
rest/__init__.py,sha256=
|
377
|
+
rest/__init__.py,sha256=0sxcxXwa77weXIPiDP-LewT4mLGu6lY2A65XEW1RCGw,122
|
378
378
|
rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
|
379
379
|
rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
|
380
380
|
rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
|
@@ -509,7 +509,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
|
|
509
509
|
ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
|
510
510
|
ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
|
511
511
|
ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
|
512
|
-
django_restit-4.2.
|
513
|
-
django_restit-4.2.
|
514
|
-
django_restit-4.2.
|
515
|
-
django_restit-4.2.
|
512
|
+
django_restit-4.2.124.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
513
|
+
django_restit-4.2.124.dist-info/METADATA,sha256=5OsAl5Cp2yoBJ4kunwsuMVsBTBtLiU2WeG95NFiZar8,7663
|
514
|
+
django_restit-4.2.124.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
515
|
+
django_restit-4.2.124.dist-info/RECORD,,
|
inbox/utils/parsing.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
from io import StringIO
|
2
2
|
import email
|
3
|
+
import re
|
4
|
+
|
3
5
|
from email.utils import parseaddr, parsedate_to_datetime, getaddresses
|
4
6
|
from email.header import decode_header
|
5
7
|
|
@@ -129,6 +131,24 @@ def toFileObject(attachment):
|
|
129
131
|
return obj
|
130
132
|
|
131
133
|
|
134
|
+
def parseAddresses(input_string):
|
135
|
+
# Define a regex pattern to capture email addresses
|
136
|
+
email_pattern = r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
|
137
|
+
# Find all matches of the pattern in the input string
|
138
|
+
emails = re.findall(email_pattern, input_string)
|
139
|
+
# Create a list to hold parsed email data
|
140
|
+
parsed_emails = []
|
141
|
+
for addr in emails:
|
142
|
+
# Extract name if it exists
|
143
|
+
name_match = re.search(r'([a-zA-Z\s]+)?\s*<{}>'.format(re.escape(addr)), input_string)
|
144
|
+
if name_match and name_match.group(1):
|
145
|
+
name = name_match.group(1).strip()
|
146
|
+
else:
|
147
|
+
name = None
|
148
|
+
parsed_emails.append(objict(name=name, email=addr))
|
149
|
+
return parsed_emails
|
150
|
+
|
151
|
+
|
132
152
|
def toString(value):
|
133
153
|
if isinstance(value, bytes):
|
134
154
|
value = value.decode()
|
rest/__init__.py
CHANGED
File without changes
|
File without changes
|