{ "info": { "author": "Will Dana", "author_email": "william.b.dana@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "# opengraph-io-python ( Python Client 1.0.5 )\n\n[![Build Status](https://travis-ci.org/wbdana/opengraph-io-python.svg?branch=master)](https://travis-ci.org/wbdana/opengraph-io-python)\n[![Coverage Status](https://coveralls.io/repos/github/wbdana/opengraph-io-python/badge.svg?branch=master)](https://coveralls.io/github/wbdana/opengraph-io-python?branch=master)\n[![Downloads](https://pepy.tech/badge/opengraphio)](https://pepy.tech/project/opengraphio)\n\n[OpenGraph.io](https://www.opengraph.io/) client library for [Python](https://www.python.org/). Given a URL, the client will make a HTTP request to OpenGraph.io which will scrape the site for OpenGraph tags. If tags exist the tags will be returned to you.\n\nOftentimes the appropriate tags will not exist and this is where OpenGraph.io shines. It will infer what the OpenGraph tags probably would be and return them to you as ```hybridGraph```.\n\nThe ```hybridGraph``` results will always default to any OpenGraph tags that were found on the page. If only some tags were found, or none were, the missing tags will be inferred from the content on the page.\n\nFor most uses, the OpenGraph.io API is free. To get a free forever key, sign up at [OpenGraph.io](https://www.opengraph.io/).\n\nIf you end up having very heavy usage, the vast majority of projects will be totally covered using one of our inexpensive plans. Dedicated plans are also available upon request.\n\n**NOTE** Our free plan previously required no `appId` but was unfortunately abused. The free plan still exists and is free forever, you will just have to create an account on [OpenGraph.io](https://www.opengraph.io/).\n\n## Installation\n\nInstallation is simple with pip:\n\n```\npip install opengraphio\n```\n\n## Usage\n\n#### Initialization\n\nTo use the client, you must first initialize an instance of the class with your ```app_id```. First, ```from opengraphio import OpenGraphIO``` and then initialize an instance of OpenGraphIO, passing it an options dict containing the required ```app_id``` key as a string:\n\n```py\nfrom opengraphio import OpenGraphIO\nopengraph = OpenGraphIO({ 'app_id': 'your_app_id_here!' })\n```\n\n#### Setting Default Options at Initialization\n\nYou may also initialize your OpenGraphIO instance with default options. For example, if you would always like to perform a ```full_render```, you can pass that parameter in the options dict at initialization along with your ```app_id```:\n\n```py\nfrom opengraphio import OpenGraphIO\nopengraph = OpenGraphIO({ 'app_id': 'your_app_id_here!', 'full_render': True })\n```\n\nThis OpenGraphIO instance will default to performing a ```full_render``` whenever you request OpenGraph tags, unless you later decide to override this option in your request (see below!).\n\nIf you do not pass any options besides the required ```app_id```, the defaults will be used:\n\n```py\n'cache_ok': True\n'full_render': False\n'version': '1.1'\n```\n\n#### Requesting OpenGraph Tags\n\nYou can request OpenGraph tags by calling ```get_site_info``` on your OpenGraphIO instance and passing it your target site as a string.\n\n```py\nopengraph.get_site_info('https://github.com')\n```\n\nThis will return a dict containing the response. See [https://www.opengraph.io/documentation/](https://www.opengraph.io/documentation/) for an example response.\n\n#### Requesting OpenGraph Tags with Overridden Options\n\n```get_site_info``` takes an optional second argument, consisting of an ```options``` dict, similar to the ```options``` dict used at initialization. The options supplied here will override the default options set at initialization for this request. For example, let's say you initialize your ```OpenGraphIO``` instance like this:\n\n```py\nfrom opengraphio import OpenGraphIO\nopengraph = OpenGraphIO({ 'app_id': 'your_app_id_here!' })\n```\n\nYou can use this instance to get a response using the ```full_render``` option and disabling the ```cache_ok``` option like so:\n\n```py\nopengraph.get_site_info('https://github.com', { 'full_render': True, 'cache_ok': False })\n```\n\n## Support\n\nPlease feel free to reach out any time with questions or suggestions by adding to the issues for this repo, or if you'd prefer, head over to [https://www.opengraph.io/support/](https://www.opengraph.io/support/) and drop us a line!\n\n## License\n\nMIT License\n\nCopyright (c) William Dana\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.com/wbdana/opengraph-io-python", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "opengraphio", "package_url": "https://pypi.org/project/opengraphio/", "platform": "", "project_url": "https://pypi.org/project/opengraphio/", "project_urls": { "Homepage": "https://www.github.com/wbdana/opengraph-io-python" }, "release_url": "https://pypi.org/project/opengraphio/1.0.5/", "requires_dist": [ "requests (>=2.20.0)" ], "requires_python": "", "summary": "A Python client for opengraph.io, a website scraper to grab OpenGraph tags or supplement them when they don't exist.", "version": "1.0.5" }, "last_serial": 5477376, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "bfd3ae8b635dae330cbb2c2b48f136b8", "sha256": "d88e52bd745989f30d8ee46ea168a6254ad30c7df9b2ac087a76b8949eeafb64" }, "downloads": -1, "filename": "opengraphio-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bfd3ae8b635dae330cbb2c2b48f136b8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4422, "upload_time": "2018-07-12T22:28:57", "url": "https://files.pythonhosted.org/packages/90/05/3a87843995a919145dcaff43dca56e97aa9d850de5cb49cf0cb260422008/opengraphio-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ebbd60a975dcc4d2f862c24bacf939b9", "sha256": "5940ebcbf31d1362f93f209a7eecb7ff869097a6c870b1bb9b75c76a97167953" }, "downloads": -1, "filename": "opengraphio-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ebbd60a975dcc4d2f862c24bacf939b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4332, "upload_time": "2018-07-12T22:28:58", "url": "https://files.pythonhosted.org/packages/ce/bc/67b597c97190b212bf6607750469e94cb4999afb7f19ce7534e370c90272/opengraphio-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "536f78d380ba55b8f1454ea4f16adc7e", "sha256": "525b430b325538a51ba2deb378319c4ea2b1b5339ef35fbd5ca468d1d3d86fa8" }, "downloads": -1, "filename": "opengraphio-0.1.1.tar.gz", "has_sig": false, "md5_digest": "536f78d380ba55b8f1454ea4f16adc7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4396, "upload_time": "2018-07-20T03:55:18", "url": "https://files.pythonhosted.org/packages/07/4d/3b3ad633f988383486f6bd93459f3ea4a86158e3b2544373b68a0fb3d5a4/opengraphio-0.1.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "2e2efb9d421ab4ec1ca2ac270186321a", "sha256": "b48c9306e27f9fdf2ae634b0dc44d7be4e94bafd5245a658f8cda45d84946bf0" }, "downloads": -1, "filename": "opengraphio-1.0.0.tar.gz", "has_sig": false, "md5_digest": "2e2efb9d421ab4ec1ca2ac270186321a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4372, "upload_time": "2018-07-20T13:53:49", "url": "https://files.pythonhosted.org/packages/31/29/3dfa6e2fa0111903b3acc0a813259a0e72bacdf671b453c959ba5930ede8/opengraphio-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "36ae6223cff53d399b29f77815912451", "sha256": "9ab21e64ae41427eaa00fc4aacdd5fdde863c7dd78815278429559a32612776d" }, "downloads": -1, "filename": "opengraphio-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "36ae6223cff53d399b29f77815912451", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5282, "upload_time": "2019-01-25T00:58:44", "url": "https://files.pythonhosted.org/packages/f6/82/69c89c3ec2fc5f7c354d4033669de2c2b671ffcf3c8111d64ece51a9f60b/opengraphio-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "24099b6dbf99c3a6b3a65db60ce8cc54", "sha256": "3a05c1ab3f65ed5ad4c22fd8e6131760a291c6ada8e2b2ae5a42957b5092c895" }, "downloads": -1, "filename": "opengraphio-1.0.1.tar.gz", "has_sig": false, "md5_digest": "24099b6dbf99c3a6b3a65db60ce8cc54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4325, "upload_time": "2019-01-25T00:54:07", "url": "https://files.pythonhosted.org/packages/7b/d3/0dded77e6b2d5d01ecf598c95d3355c32d436d3c630d72059765efee5237/opengraphio-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "db1f89438c45e5841753b35666a90edf", "sha256": "302c870f9e8d10b0c9015ed6228722ac148ff131bf15cc28a7aee21aeea49528" }, "downloads": -1, "filename": "opengraphio-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "db1f89438c45e5841753b35666a90edf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5282, "upload_time": "2019-01-25T01:02:07", "url": "https://files.pythonhosted.org/packages/67/28/09c907a18493f60bcbbdd68e46e49fac8da3eae477ce853e755bec050f93/opengraphio-1.0.2-py3-none-any.whl" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "ddff9b74841ae57897e81d43b4a64127", "sha256": "1dde2c13ea021393b0a822b4853b8fd86a925c901a2b9b8375d477259f2c7ae4" }, "downloads": -1, "filename": "opengraphio-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "ddff9b74841ae57897e81d43b4a64127", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5281, "upload_time": "2019-01-25T01:10:21", "url": "https://files.pythonhosted.org/packages/41/97/1a410078cc373dd10625ac56bc2c585ab19205d03c5ad2056073ba968bd8/opengraphio-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d5c5b4dcc4adc7c75d4b61694812de8", "sha256": "8464ded3abf6dacd3e9dc723a87cf34b055742e02bbf6955d49e228f508aaef4" }, "downloads": -1, "filename": "opengraphio-1.0.3.tar.gz", "has_sig": false, "md5_digest": "5d5c5b4dcc4adc7c75d4b61694812de8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4326, "upload_time": "2019-01-25T01:10:22", "url": "https://files.pythonhosted.org/packages/88/ea/70b7a9490d8304a13930f5ab9b0392f2a456a70bb1de17903a497725299d/opengraphio-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "fcb105b89ed345a1dcf8694c12710c84", "sha256": "24c0ee59cbd583d0fc51228a408b592c1a7fad993da17fee7c94a2e2ec2d543c" }, "downloads": -1, "filename": "opengraphio-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "fcb105b89ed345a1dcf8694c12710c84", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5314, "upload_time": "2019-03-03T23:21:36", "url": "https://files.pythonhosted.org/packages/e8/36/c1d6faaed55f701c5e705b6a3947bdde2553b93f5bac56986460967bef60/opengraphio-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca09739f689ff2dd6e5e43e42dbb4e77", "sha256": "1b58dca491b7273ad514d317c287982cf44f0f0e0ec55e9d715f20dc867a7622" }, "downloads": -1, "filename": "opengraphio-1.0.4.tar.gz", "has_sig": false, "md5_digest": "ca09739f689ff2dd6e5e43e42dbb4e77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4361, "upload_time": "2019-03-03T23:21:37", "url": "https://files.pythonhosted.org/packages/c0/9b/6416b9dff0dec17dcc9f6ac7a114050a0881b7688c309ff55e43bd0a9a99/opengraphio-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "59b34cda3315c01c98f9a07c67a778c5", "sha256": "ce9c2177327b2d218372a5c9ddb04b23c40d911ed20c00ba9bd61dab145e52f5" }, "downloads": -1, "filename": "opengraphio-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "59b34cda3315c01c98f9a07c67a778c5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5313, "upload_time": "2019-07-02T15:53:34", "url": "https://files.pythonhosted.org/packages/32/fc/c207b83784874a31c790ebbf24ce78ff71cbf70f69e9402e6948d6bd8e27/opengraphio-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "efb29f80081c128b8b7e84008ab1c3a8", "sha256": "5ede6643a49d61dbacc03845008ed2a15b511df00e5d9e8b51102f3b8f1ff9f2" }, "downloads": -1, "filename": "opengraphio-1.0.5.tar.gz", "has_sig": false, "md5_digest": "efb29f80081c128b8b7e84008ab1c3a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4359, "upload_time": "2019-07-02T15:53:36", "url": "https://files.pythonhosted.org/packages/95/99/2c348ae2ce690c956361193ecc8ecc8ee170d56b660ef6cf2052656e6834/opengraphio-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "59b34cda3315c01c98f9a07c67a778c5", "sha256": "ce9c2177327b2d218372a5c9ddb04b23c40d911ed20c00ba9bd61dab145e52f5" }, "downloads": -1, "filename": "opengraphio-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "59b34cda3315c01c98f9a07c67a778c5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5313, "upload_time": "2019-07-02T15:53:34", "url": "https://files.pythonhosted.org/packages/32/fc/c207b83784874a31c790ebbf24ce78ff71cbf70f69e9402e6948d6bd8e27/opengraphio-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "efb29f80081c128b8b7e84008ab1c3a8", "sha256": "5ede6643a49d61dbacc03845008ed2a15b511df00e5d9e8b51102f3b8f1ff9f2" }, "downloads": -1, "filename": "opengraphio-1.0.5.tar.gz", "has_sig": false, "md5_digest": "efb29f80081c128b8b7e84008ab1c3a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4359, "upload_time": "2019-07-02T15:53:36", "url": "https://files.pythonhosted.org/packages/95/99/2c348ae2ce690c956361193ecc8ecc8ee170d56b660ef6cf2052656e6834/opengraphio-1.0.5.tar.gz" } ] }