{ "info": { "author": "Rafael Goncalves Martins", "author_email": "rafael@rafaelmartins.eng.br", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2" ], "description": "pyoembed\n========\n\n.. image:: https://ci.rgm.io/buildStatus/icon?job=pyoembed\n :target: https://ci.rgm.io/job/pyoembed/\n\nA Python library for oEmbed that supports auto-discovered and manually\nincluded providers.\n\n\nInstallation\n------------\n\n::\n\n $ pip install pyoembed\n\n\nUsage\n-----\n\nThe library provides a function that should be called to automatically embed\nthe url content, and it is called ``oEmbed``:\n\n.. sourcecode:: python\n\n from pyoembed import oEmbed, PyOembedException\n\n try:\n # maxwidth and maxheight are optional.\n data = oEmbed('http://www.youtube.com/watch?v=_PEdPBEpQfY',\n maxwidth=640, maxheight=480)\n except PyOembedException, e:\n print 'An error was ocurred: %s' % e\n\n # data is a dict with keys that will depends on the media type. You should\n # choose how to display the content based on the data['type'] value and\n # the oEmbed spec ( http://oembed.com/ ).\n if data['type'] == 'video':\n print data['html']\n\n # and it goes... Someday we will provide default renderes for each media\n # type.\n\n\nAddition of new providers\n-------------------------\n\npyoembed tries to cover the major oEmbed providers, and should works for any\nprovider that supports oEmbed auto-discover out-of-the box, however your\nfavorite provider may be unsupported yet! :(\n\nTo add it, create a file inside the ``pyoembed.providers`` package, based on\nthe following example:\n\n.. sourcecode:: python\n\n from pyoembed.providers import BaseProvider\n\n\n class InstagramProvider(BaseProvider):\n\n # priority of the provider. Increase it if the provider isn't well known\n priority = 10\n\n # url schemas that are supported by the provider.\n # re.compile'd regex are allowed.\n oembed_schemas = ['http://instagram.com/p/*',\n 'http://instagr.am/p/*']\n\n # api endpoint that answers to oEmbed requests for the provider.\n oembed_endpoint = 'http://api.instagram.com/oembed'\n\n\nYou will also need to add some test urls of your provider to the\n``integration_test.py`` file, and run it to see if everything is ok.\n\nIf everything works, feel free to send a pull request to add the provider:\n\nhttps://github.com/rafaelmartins/pyoembed/pulls\n\nThat's it!\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "pyoembed", "package_url": "https://pypi.org/project/pyoembed/", "platform": "any", "project_url": "https://pypi.org/project/pyoembed/", "project_urls": null, "release_url": "https://pypi.org/project/pyoembed/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "A Python library for oEmbed that supports auto-discovered and manually included providers.", "version": "0.1.2" }, "last_serial": 3341109, "releases": { "0": [], "0.1": [ { "comment_text": "", "digests": { "md5": "37a942fd9fb593e3186e4458e424fcea", "sha256": "6e9fd950a12f34ec2f94a40bd4b6aca5c09a64bc7df82f27689ebdecb7b7c487" }, "downloads": -1, "filename": "pyoembed-0.1.tar.gz", "has_sig": false, "md5_digest": "37a942fd9fb593e3186e4458e424fcea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12764, "upload_time": "2014-03-03T21:38:54", "url": "https://files.pythonhosted.org/packages/f4/6a/1bcf98340baa2ea1fab9c5d0a2cd94e76799de40c86e38c0b89496246c3b/pyoembed-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "8acfa85928d21d4603c8d7f09845a014", "sha256": "7a50072d8f0e38e9aa586c24fd693f225ccd78936f55fa35c3fed3fadf1b0e13" }, "downloads": -1, "filename": "pyoembed-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8acfa85928d21d4603c8d7f09845a014", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12941, "upload_time": "2014-06-15T20:37:41", "url": "https://files.pythonhosted.org/packages/ae/e5/3002c1146eb64a46f87004f96b0340e2327c11c79f933243e9d1c46812a1/pyoembed-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "be709b9019b3e7969401eaac1577d2a1", "sha256": "0f755c8308039f1e49238e95ea94ef16aa08add9f32075ba13ab9b65f32ff582" }, "downloads": -1, "filename": "pyoembed-0.1.2.tar.gz", "has_sig": false, "md5_digest": "be709b9019b3e7969401eaac1577d2a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12502, "upload_time": "2017-11-17T11:51:21", "url": "https://files.pythonhosted.org/packages/32/11/7b9549660ae130668cabc886e4012572745508d381cd0005239b082129a8/pyoembed-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "be709b9019b3e7969401eaac1577d2a1", "sha256": "0f755c8308039f1e49238e95ea94ef16aa08add9f32075ba13ab9b65f32ff582" }, "downloads": -1, "filename": "pyoembed-0.1.2.tar.gz", "has_sig": false, "md5_digest": "be709b9019b3e7969401eaac1577d2a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12502, "upload_time": "2017-11-17T11:51:21", "url": "https://files.pythonhosted.org/packages/32/11/7b9549660ae130668cabc886e4012572745508d381cd0005239b082129a8/pyoembed-0.1.2.tar.gz" } ] }