python-oembed

Implements an OEmbed consumer to use with OEmbed providers
Download

python-oembed Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Ariel Barmat
  • Publisher web site:
  • http://code.google.com/u/abarmat/

python-oembed Tags


python-oembed Description

Implements an OEmbed consumer to use with OEmbed providers python-oembed is a Python library that provides a pure python OEmbed consumer to get resources from OEmbed providers.Based on reference from http://oembed.com/oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.OEmbed format authors:* Cal Henderson (cal at iamcal.com)* Mike Malone (mike at pownce.com)* Leah Culver (leah at pownce.com)* Richard Crowley (r at rcrowley.org)Usage:To create an instance of the oEmbed consumer:>>> import oembed>>> consumer = oembed.OEmbedConsumer()To add a provider endpoint to this consumer:* The first parameter is the URL of the endpoint published by the provider.* The second parameter is the URL schema to use with this endpoint. >>> endpoint = oembed.OEmbedEndpoint('http://www.flickr.com/services/oembed', )>>> consumer.addEndpoint(endpoint)To get the provider response for a URL:response = consumer.embed('http://www.flickr.com/photos/wizardbt/2584979382/')To print the response results (each field can be read as a python dict, None if empty):print responseimport pprintpprint.pprint(response.getData())To read the full documentation: $ pydoc oembed Requirements: · Python


python-oembed Related Software