{ "info": { "author": "Jeremy Carbaugh", "author_email": "jcarbaugh@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=========\nwebfinger\n=========\n\nA simple Python client implementation of `WebFinger RFC 7033 `_.\n\nWebFinger is a discovery protocol that allows you to find information about people or things in a standardized way. See the `spec `_ or `webfinger.net `_ for more information.\n\n::\n\n >>> from webfinger import finger\n >>> wf = finger('acct:eric@konklone.com')\n >>> wf.subject\n acct:eric@konklone.com\n >>> wf.avatar\n https://secure.gravatar.com/avatar/ac3399caecce27cb19d381f61124539e.jpg?s=400\n >>> wf.profile\n https://konklone.com\n >>> wf.properties.get('http://schema.org/name')\n Eric Mill\n\n\nfinger\n======\n\nfinger(resource, rel=None)\n *finger* is a convenience method for instantiating a WebFingerClient object and making the request. The *resource* parameter is a URI of the resource about which you are querying. The optional *rel* parameter can be either a string or a list of strings that will limit the response to the specific relations. WebFinger servers are **not** required to obey the *rel* parameter, so you should handle the response accordingly.\n\n WebFingerClient supports additional options, so check that out if *finger* does not meet your needs.\n\n\nWebFinger Client\n================\n\nWebFingerClient(timeout=None, official=False)\n Instantiates a client object. The optional *timeout* parameter specifies the HTTP request timeout. The optional *official* parameter is a boolean that determines if the client will use `unofficial endpoints`_.\n\nfinger(resource, host=None, rel=None, raw=False)\n The client *finger* method prepares and executes the WebFinger request. *resource* and *rel* are the same as the parameters on the standalone *finger* method. *host* should only be specified if you want to connect to a host other than the host in the resource parameter. Otherwise, this method extracts the host from the *resource* parameter. *raw* is a boolean that determines if the method returns a WebFingerResponse object or the raw JRD response as a dict.\n\n If the *host* parameter is passed to this method, unofficial endpoints are ignored. You're asking for a specific host so who am I to disagree?\n\n\nWebFinger Response\n==================\n\nThe WebFinger response object provides handy properties for easy access and the raw JRD response. Read the `spec for specifics of the JRD response `_.\n\n\nProperties\n----------\n\nsubject\n The URI of the thing that the response JRD describes.\n\naliases\n A list of additional URIs that identify the subject.\n\nproperties\n A dict of URIs and values that provides information about the subject.\n\nlinks\n A list of dicts that define external resources for the subject.\n\njrd\n A dict of the raw JRD response.\n\n\nMethods\n-------\n\nrel(relation, attr='href')\n A convenience method that provides basic access to links. The *relation* parameter is a URI for the desired link. The *attr* parameter is the key of the returned value of the link that matches *relation*. Returns a string if *relation* and *attr* exist, otherwise *None*.\n\n ::\n\n >>> wf.rel('http://webfinger.net/rel/avatar')\n https://secure.gravatar.com/avatar/ac3399caecce27cb19d381f61124539e.jpg?s=400\n\n The response JRD may have multiple entries with the same relation URI. The *rel* method will select the first one, since order is meant to imply priority. If you need to see all of the values, you'll have to iterate over the *links* property and pull them out yourself.\n\n ::\n\n >>> rel = 'http://webfinger.net/rel/avatar'\n >>> [l.get('href') for l in rel.links if l.get('rel') == rel]\n\n If *attr* is None, the full dict for the link will be returned.\n\n\n\nRelation Properties\n-------------------\n\nThe following common link relation types are supported as properties of the response object:\n\n* activity_streams: http://activitystrea.ms/spec/1.0\n* avatar: http://webfinger.net/rel/avatar\n* hcard: http://microformats.org/profile/hcard\n* open_id: http://specs.openid.net/auth/2.0/provider\n* opensocial: http://ns.opensocial.org/2008/opensocial/activitystreams\n* portable_contacts: http://portablecontacts.net/spec/1.0\n* profile: http://webfinger.net/rel/profile-page\n* webfist: http://webfist.org/spec/rel\n* xfn: http://gmpg.org/xfn/11\n\nExample::\n\n >>> wf.avatar\n https://secure.gravatar.com/avatar/ac3399caecce27cb19d381f61124539e.jpg?s=400\n\n\n.. _unofficial endpoints:\n\nUnofficial Endpoints\n====================\n\nWhile Facebook and Twitter do not officially support WebFinger, the `webfinger-unofficial project `_ provides a proxy for basic subject information. By default, python-webfinger will attempt to use unoffical the endpoints for facebook.com and twitter.com resource domains. This behavior can be disabled by passing *True* to the *official* parameter::\n\n >>> wf = finger('acct:konklone@twitter.com', official=True)\n\n\nDependencies\n============\n\n* `requests `_\n\n\nLicense\n=======\n\npython-webfinger is distributed under the `BSD license `_.\n\nSee LICENSE for the full terms.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/jcarbaugh/python-webfinger/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "webfinger", "package_url": "https://pypi.org/project/webfinger/", "platform": "any", "project_url": "https://pypi.org/project/webfinger/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/jcarbaugh/python-webfinger/" }, "release_url": "https://pypi.org/project/webfinger/1.0/", "requires_dist": null, "requires_python": null, "summary": "Simple Python implementation of WebFinger client protocol", "version": "1.0" }, "last_serial": 909881, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "693d648fde1524b5f289caa9ee52a42a", "sha256": "f9b7c8a4a65945aceb092c73f0d6ff25fc40e21977bde4f3e38384ee4aa571ff" }, "downloads": -1, "filename": "webfinger-1.0.tar.gz", "has_sig": false, "md5_digest": "693d648fde1524b5f289caa9ee52a42a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5935, "upload_time": "2013-11-02T21:28:52", "url": "https://files.pythonhosted.org/packages/3e/c7/16b8157e0c57001451210c0a17d1ad081232dfe18d735b953179f04e7900/webfinger-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "693d648fde1524b5f289caa9ee52a42a", "sha256": "f9b7c8a4a65945aceb092c73f0d6ff25fc40e21977bde4f3e38384ee4aa571ff" }, "downloads": -1, "filename": "webfinger-1.0.tar.gz", "has_sig": false, "md5_digest": "693d648fde1524b5f289caa9ee52a42a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5935, "upload_time": "2013-11-02T21:28:52", "url": "https://files.pythonhosted.org/packages/3e/c7/16b8157e0c57001451210c0a17d1ad081232dfe18d735b953179f04e7900/webfinger-1.0.tar.gz" } ] }