• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python util_client.encode函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中squeakspace.common.util_client.encode函数的典型用法代码示例。如果您正苦于以下问题:Python encode函数的具体用法?Python encode怎么用?Python encode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了encode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: create_group

 def create_group(self, user_id, session_id, node_name, group_id,
                  post_access, read_access, delete_access,
                  posting_key_hash, reading_key_hash, delete_key_hash,
                  quota_allocated, when_space_exhausted,
                  max_post_size,
                  public_key_hash, passphrase=None):
 
     method = 'POST'
     path = '/proxy/group'
     body = uc.encode(
             {'node_name' : node_name,
              'group_id' : group_id,
              'post_access' : post_access,
              'read_access' : read_access,
              'delete_access' : delete_access,
              'posting_key_hash' : posting_key_hash,
              'reading_key_hash' : reading_key_hash,
              'delete_key_hash' : delete_key_hash,
              'quota_allocated' : quota_allocated,
              'when_space_exhausted' : when_space_exhausted,
              'max_post_size' : max_post_size,
              'public_key_hash' : public_key_hash,
              'passphrase' : passphrase})
     cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=body, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:26,代码来源:client.py


示例2: read_version

 def read_version(self, node_name):
 
     method = 'GET'
     url = '/version?' + uc.encode(
             {'node_name' : node_name})
 
     return self.send_and_getter.send_and_get(self.conn, method, url)
开发者ID:elpassassin,项目名称:squeakspace,代码行数:7,代码来源:client_raw.py


示例3: create_group

 def create_group(
         self,
         timestamp, node_name, group_id, owner_id,
         post_access, read_access, delete_access,
         posting_key_type, posting_pub_key,
         reading_key_type, reading_pub_key,
         delete_key_type, delete_pub_key,
         quota_allocated, when_space_exhausted,
         max_post_size,
         public_key_hash, signature):
 
     method = 'POST'
     url = '/group'
     body = uc.encode(
             {'timestamp' : timestamp,
              'node_name' : node_name,
              'group_id' : group_id,
              'owner_id' : owner_id,
              'post_access' : post_access,
              'read_access' : read_access,
              'delete_access' : delete_access,
              'posting_key_type' : posting_key_type,
              'posting_pub_key' : posting_pub_key,
              'reading_key_type' : reading_key_type,
              'reading_pub_key' : reading_pub_key,
              'delete_key_type' : delete_key_type,
              'delete_pub_key' : delete_pub_key,
              'quota_allocated' : quota_allocated,
              'when_space_exhausted' : when_space_exhausted,
              'max_post_size' : max_post_size,
              'public_key_hash' : public_key_hash,
              'signature' : signature})
 
     return self.send_and_getter.send_and_get(self.conn, method, url, body)
开发者ID:elpassassin,项目名称:squeakspace,代码行数:34,代码来源:client_raw.py


示例4: create_user

 def create_user(self, node_name, user_id,
                 key_type, public_key, public_key_hash, revoke_date,
                 default_message_access, when_mail_exhausted,
                 quota_size, mail_quota_size,
                 max_message_size,
                 user_class, auth_token):
 
     method = 'POST'
     url = '/user'
     body = uc.encode(
             {'node_name' : node_name,
              'user_id' : user_id,
              'key_type' : key_type,
              'public_key' : public_key,
              'public_key_hash' : public_key_hash,
              'revoke_date' : revoke_date,
              'default_message_access' : default_message_access,
              'when_mail_exhausted' : when_mail_exhausted,
              'quota_size' : quota_size,
              'mail_quota_size' : mail_quota_size,
              'max_message_size' : max_message_size,
              'user_class' : user_class,
              'auth_token' : auth_token})
 
     return self.send_and_getter.send_and_get(self.conn, method, url, body)
开发者ID:elpassassin,项目名称:squeakspace,代码行数:25,代码来源:client_raw.py


示例5: query_user

    def query_user(self, node_name, user_id):

        method = 'GET'
        url = '/query-user?' + uc.encode(
                {'node_name' : node_name,
                 'user_id' : user_id})
    
        return self.send_and_getter.send_and_get(self.conn, method, url)
开发者ID:elpassassin,项目名称:squeakspace,代码行数:8,代码来源:client_raw.py


示例6: read_node_addr

 def read_node_addr(self, user_id, session_id, node_name):
 
     method = 'GET'
     path = '/local/node-addr?' + uc.encode(
             {'node_name' : node_name})
     cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=None, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:8,代码来源:client.py


示例7: read_quota_available

 def read_quota_available(self, node_name, user_class):
 
     method = 'GET'
     url = '/quota-available?' + uc.encode(
             {'node_name' : node_name,
              'user_class' : user_class})
 
     return self.send_and_getter.send_and_get(self.conn, method, url)
开发者ID:elpassassin,项目名称:squeakspace,代码行数:8,代码来源:client_raw.py


示例8: list_user_keys

    def list_user_keys(self, user_id, session_id, node_name=None):

        method = 'GET'
        path = '/local/list-user-keys?' + uc.encode(
                {'node_name' : node_name})
        cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})

        return self.send_and_getter.send_and_get(self.conn, method, path, body=None, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:8,代码来源:client.py


示例9: read_public_key

 def read_public_key(self, user_id, session_id, public_key_hash):
 
     method = 'GET'
     path = '/local/public-key?' + uc.encode(
             {'public_key_hash' : public_key_hash})
     cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=None, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:8,代码来源:client.py


示例10: delete_node_addr

 def delete_node_addr(self, user_id, session_id, node_name):
 
     method = 'DELETE'
     path = '/local/node-addr'
     body = uc.encode(
             {'node_name' : node_name})
     cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=body, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:9,代码来源:client.py


示例11: query_user

    def query_user(self, user_id, session_id, node_name, other_user_id):

        method = 'GET'
        path = '/proxy/query-user?' + uc.encode(
                {'node_name' : node_name,
                 'other_user_id' : other_user_id})
        cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})

        return self.send_and_getter.send_and_get(self.conn, method, path, body=None, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:9,代码来源:client.py


示例12: delete_public_key

 def delete_public_key(self, user_id, session_id, public_key_hash):
 
     method = 'DELETE'
     path = '/local/public-key'
     body = uc.encode(
             {'public_key_hash' : public_key_hash})
     cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=body, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:9,代码来源:client.py


示例13: create_local_user

 def create_local_user(self, user_id, password):
 
     method = 'POST'
     path = '/local/user'
     body = uc.encode(
             {'user_id' : user_id,
              'password' : password})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=body, cookies=None)
开发者ID:elpassassin,项目名称:squeakspace,代码行数:9,代码来源:client.py


示例14: read_quota_available

 def read_quota_available(self, user_id, session_id, node_name, user_class):
 
     method = 'GET'
     path = '/proxy/quota-available?' + uc.encode(
             {'node_name' : node_name,
              'user_class' : user_class})
     cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=None, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:9,代码来源:client.py


示例15: read_private_key

 def read_private_key(self, user_id, session_id, public_key_hash, only_public_part=None, allow_private_user_key=None):
 
     method = 'GET'
     path = '/local/private-key?' + uc.encode(
             {'public_key_hash' : public_key_hash,
              'only_public_part' : only_public_part,
              'allow_private_user_key' : allow_private_user_key})
     cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=None, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:10,代码来源:client.py


示例16: encrypt

    def encrypt(self, user_id, session_id, public_key_hash, plaintext):

        method = 'POST'
        path = '/local/crypt/encrypt'
        body = uc.encode(
                {'public_key_hash' : public_key_hash,
                 'plaintext' : plaintext})
        cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})

        return self.send_and_getter.send_and_get(self.conn, method, path, body, cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:10,代码来源:client.py


示例17: read_message_quota

 def read_message_quota(self, user_id, session_id, node_name, public_key_hash, passphrase=None):
 
     method = 'GET'
     path = '/proxy/message-quota?' + uc.encode(
             {'node_name' : node_name,
              'public_key_hash' : public_key_hash,
              'passphrase' : passphrase})
     cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=None, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:10,代码来源:client.py


示例18: assign_user_key

 def assign_user_key(self, user_id, session_id, node_name, public_key_hash):
 
     method = 'POST'
     path = '/local/user-key'
     body = uc.encode(
             {'node_name' : node_name,
              'public_key_hash' : public_key_hash})
     cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=body, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:10,代码来源:client.py


示例19: read_max_post_size

 def read_max_post_size(self, timestamp, node_name, group_id, owner_id, post_signature):
     method = 'GET'
     url = '/max-post-size?' + uc.encode(
             {'timestamp' : timestamp,
              'node_name' : node_name,
              'group_id' : group_id,
              'owner_id' : owner_id,
              'post_signature' : post_signature})
 
     return self.send_and_getter.send_and_get(self.conn, method, url)
开发者ID:elpassassin,项目名称:squeakspace,代码行数:10,代码来源:client_raw.py


示例20: read_local_message_access

 def read_local_message_access(self, user_id, session_id, to_user, node_name, from_user_key_hash):
 
     method = 'GET'
     path = '/local/message-access?' + uc.encode(
             {'to_user' : to_user,
              'node_name' : node_name,
              'from_user_key_hash' : from_user_key_hash})
     cookies = co.SimpleCookie({'user_id' : user_id, 'session_id' : session_id})
 
     return self.send_and_getter.send_and_get(self.conn, method, path, body=None, cookies=cookies)[0]
开发者ID:elpassassin,项目名称:squeakspace,代码行数:10,代码来源:client.py



注:本文中的squeakspace.common.util_client.encode函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python util_http.convert_squeak_exception函数代码示例发布时间:2022-05-27
下一篇:
Python square.Square类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap