克里斯蒂安·斯科尔斯

pydataportability.discover的Python项目详细描述


简介

pydataportability.discovery是用于发现资源描述的组件 文件。这些是XRD documents描述 一种资源,可以选择指向相关资源。一个用例是 webfinger project其中使用xrd存储 有关用户的信息。标识用户的uri是例如acct:user@example.com 这个发现组件能够通过 LRDD

安装

最简单的安装方法是通过easy_install

easy_install pydataportability.discovery

建议在virtualenv中执行此操作

简单用法

安装后,您将在路径(或virtualenv的bin/目录)中有两个新命令: discoverwebfinger。不过,这些只是示例脚本。两者都有发现 在您输入的uri上,但后者将只检查webfinger关系,并将 另外,检查是否传入了以acct:开头的用户标识符,该标识符是 提出的webfinger协议方案。如果你没有,它会为你添加它。

下面是一个示例:

$ webfinger someuser@googlemail.com

Subject:  acct:someuser@googlemail.com

Rels:  ['http://portablecontacts.net/spec/1.0']
URIs: ['http://www-opensocial.googleusercontent.com/api/people/']
Media Types: []
Prio: 0
Templates: []

所以这主要是打印所发现的xrd文件的内容。请注意 你正在测试的用户需要在google上启用它。查看 webfinger homepagemailing list了解更多信息。

文件

您可以在http://dataportability.net找到此组件的文档

警告

请注意,XRD规范和WebFinger协议都很重要 发展和可能改变。

许可证

此项目是在bsd许可证下发布的:

版权所有(c)2009,Christian Scholz 保留所有权利。

允许以源文件和二进制文件的形式重新分发和使用,无论是否修改,只要 满足以下条件:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

本软件由版权所有者和贡献者“按原样”以及任何明示或默示保证提供, 包括但不限于,适销性和适合特定目的的默示保证。 否认。在任何情况下,版权持有人或贡献者对任何直接、间接、附带的, 特殊、惩戒性或后果性损害(包括但不限于采购替代货物或 服务;使用、数据或利润损失;或营业中断),无论是何种原因造成的,根据任何责任理论, 无论是在合同中,严格责任或侵权(包括疏忽或其他)产生的任何方式使用 这个软件,即使被告知这种损坏的可能性。

更改日志

0.4-2009年10月12日
  • 初始版本

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java创建猜谜游戏程序   JavaWebSocketContainer。connectToServer似乎挂起了   如何在java中中断函数   java c#socket client multiple BeginSend()未到达服务器   不可见的组件然后在Java中的窗格之间切换   java在应用程序类中使用静态接口安全吗?   java等待函数完成,直到回调到来   使用DataOutputStream时的java新行,Android   java服务对象的定义是什么?   基于视图的javahibernate复合密钥   java将varchar连接到char在JPA(oracle)中不起作用   如何在java中通过point类读取多个点?