MyCoServer/mycoserver/conv.py

34 lines
819 B
Python

# -*- coding: utf-8 -*-
from biryani1.baseconv import cleanup_line, empty_to_none, not_none, pipe, struct
inputs_to_login_data = struct(
{
'email': pipe(cleanup_line, empty_to_none),
'password': pipe(cleanup_line, empty_to_none),
},
default='drop',
drop_none_values=False,
)
inputs_to_subscribe_data = struct(
{
'email': pipe(cleanup_line, empty_to_none),
'name': pipe(cleanup_line, empty_to_none),
'password': pipe(cleanup_line, empty_to_none),
},
default='drop',
drop_none_values=False,
)
inputs_to_sync_data = struct(
{
'email': pipe(cleanup_line, empty_to_none),
'password': pipe(cleanup_line, empty_to_none),
'groups': pipe(empty_to_none),
},
default='drop',
drop_none_values=False,
)