{ "info": { "author": "Jeremy Carbaugh, Elizabeth Myers", "author_email": "elizabeth@interlinked.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", "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:Elizafox@mst3k.interlinked.me')\n >>> wf.subject\n acct:Elizafox@mst3k.interlinked.me\n >>> wf.rels[\"profile\"]\n [{'rel': 'http://webfinger.net/rel/profile-page', 'type': 'text/html', 'href': 'https://mst3k.interlinked.me/@Elizafox'}]\n >>> wf.aliases\n ['https://mst3k.interlinked.me/@Elizafox', 'https://mst3k.interlinked.me/users/Elizafox']\n\nInstallation\n============\n\n::\n pip install git+https://github.com/Elizafox/webfinger\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 objects that define external resources for the subject..\n\nrels\n An ordered dictionary containing a list of objects referenced by the given relation name (or friendly name).\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\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.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/jcarbaugh/python-webfinger/", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "webfinger2", "package_url": "https://pypi.org/project/webfinger2/", "platform": "any", "project_url": "https://pypi.org/project/webfinger2/", "project_urls": { "Homepage": "http://github.com/jcarbaugh/python-webfinger/" }, "release_url": "https://pypi.org/project/webfinger2/2.1/", "requires_dist": null, "requires_python": "", "summary": "Simple Python implementation of WebFinger client protocol", "version": "2.1" }, "last_serial": 3242149, "releases": { "2.0": [ { "comment_text": "", "digests": { "md5": "71e63d7c6fc87bc24bd9cc9a3d33a4a1", "sha256": "05abb556190ef8505066f247b5e530d0ee9d6650ad694d0f221145dbc99064a2" }, "downloads": -1, "filename": "webfinger2-2.0.tar.gz", "has_sig": false, "md5_digest": "71e63d7c6fc87bc24bd9cc9a3d33a4a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6556, "upload_time": "2017-10-10T18:23:54", "url": "https://files.pythonhosted.org/packages/62/7d/2e6bc37a64bdca75a1f2557f57a69aa8f82c171fbbd9be650438d91a5051/webfinger2-2.0.tar.gz" } ], "2.1": [ { "comment_text": "", "digests": { "md5": "56631f88871c88c5c78891c8ec1a0b78", "sha256": "1aebdfe4cb1236ceff27275a26febdbd736400975be5903ec50fa82693fed278" }, "downloads": -1, "filename": "webfinger2-2.1.tar.gz", "has_sig": false, "md5_digest": "56631f88871c88c5c78891c8ec1a0b78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6891, "upload_time": "2017-10-11T14:02:32", "url": "https://files.pythonhosted.org/packages/3c/94/0792fdfbf537eb04424393d9be567461b1c5b12cf85a03fe55ea6dd6f537/webfinger2-2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "56631f88871c88c5c78891c8ec1a0b78", "sha256": "1aebdfe4cb1236ceff27275a26febdbd736400975be5903ec50fa82693fed278" }, "downloads": -1, "filename": "webfinger2-2.1.tar.gz", "has_sig": false, "md5_digest": "56631f88871c88c5c78891c8ec1a0b78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6891, "upload_time": "2017-10-11T14:02:32", "url": "https://files.pythonhosted.org/packages/3c/94/0792fdfbf537eb04424393d9be567461b1c5b12cf85a03fe55ea6dd6f537/webfinger2-2.1.tar.gz" } ] }