mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:46:30 +00:00
18 lines
451 B
Cython
18 lines
451 B
Cython
from msgpack import unpackb
|
|
|
|
cdef class Credentials:
|
|
|
|
def __init__(self, str email, str password, str folder):
|
|
self.email = email
|
|
self.password = password
|
|
self.folder = folder
|
|
|
|
@staticmethod
|
|
cdef from_msgpack(bytes data):
|
|
unpacked = unpackb(data, strict_map_key=False)
|
|
return Credentials(
|
|
unpacked.get("Email"),
|
|
unpacked.get("Password"),
|
|
unpacked.get("Folder"))
|
|
|