克里斯蒂安·斯科尔斯
pydataportability.discover的Python项目详细描述
简介
pydataportability.discovery是用于发现资源描述的组件 文件。这些是XRD documents描述 一种资源,可以选择指向相关资源。一个用例是 webfinger project其中使用xrd存储 有关用户的信息。标识用户的uri是例如acct:user@example.com 这个发现组件能够通过 LRDD。
简单用法
安装后,您将在路径(或virtualenv的bin/目录)中有两个新命令: discover和webfinger。不过,这些只是示例脚本。两者都有发现 在您输入的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 homepage和 mailing list了解更多信息。
许可证
此项目是在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.
本软件由版权所有者和贡献者“按原样”以及任何明示或默示保证提供, 包括但不限于,适销性和适合特定目的的默示保证。 否认。在任何情况下,版权持有人或贡献者对任何直接、间接、附带的, 特殊、惩戒性或后果性损害(包括但不限于采购替代货物或 服务;使用、数据或利润损失;或营业中断),无论是何种原因造成的,根据任何责任理论, 无论是在合同中,严格责任或侵权(包括疏忽或其他)产生的任何方式使用 这个软件,即使被告知这种损坏的可能性。