MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Python Client Library

Last post 10-06-2009 8:26 AM by Velinno. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-08-2008 2:59 PM

    • Eric
    • Top 500 Contributor
    • Joined on 02-06-2008
    • Posts 17

    Python Client Library

    I started a simple python client which returns results in a dict format as parsed from myspace's json response.

    It isn't fully completed, but is usable... any contributions are more than welcome.

    http://code.google.com/p/myspace-python/

    Filed under:
  • 02-08-2008 9:09 PM In reply to

    Re: Python Client Library

    Great! Looking forward to checking it out.

    -Thanks
    -V
  • 03-02-2008 6:31 PM In reply to

    Re: Python Client Library

    Not sure why the FAQ says there isn't a library; this works plenty well for what I've needed..  Thanks to the person that slapped this together!   I owe you a beer.

     

     

  • 03-10-2008 2:35 PM In reply to

    Re: Python Client Library

    Python oauth.py (http://oauth.googlecode.com/svn/code/python/) warning:

    MySpace calculates OAuth signatures with empty URL parameters (just keys), while Python oauth strips those empty parameters - resulting in signature mismatch.

    This patch fixes how oauth.py uses empty parameters:

    http://pastebin.com/f6a77dcf8 

  • 03-10-2008 4:43 PM In reply to

    • Eric
    • Top 500 Contributor
    • Joined on 02-06-2008
    • Posts 17

    Re: Python Client Library

    Patch has been applied to the oauth.py included in myspace-python.

    Thanks mystery.

  • 05-14-2008 5:45 PM In reply to

    • Josh
    • Not Ranked
    • Joined on 03-17-2008
    • Posts 4

    Re: Python Client Library

    Thanks for this great library.  I'm using it with Django.  I spent about a week wrestling with something in the code, and I just now resolved the problem.  In the OAuthRequest.get_normalized_parameters method, the first line is "params = self.parameters" and then you try to remove the oauth_signature from the parameters if it exists.  This was causing problems for me because params was immutable.  If you tack on ".copy()" it makes the error go away.

     See http://code.google.com/p/myspace-python/issues/detail?id=1

     Thanks again for the awesome work!

  • 09-17-2008 5:32 AM In reply to

    Re: Python Client Library

    Great job!

    But I have some questions:

    - Why it don't have access to albuns and vídeos?

    - How detect unauthorized access and redirect to MyScpace requesting user to sign in and Trust in my application

     

    Do you thing about an egg release?

    Cheers,

  • 10-06-2009 8:26 AM In reply to

    Re: Python Client Library

     Hi there,

     

    I downloaded the library and trying to run the example appearing at the project's home page, but get an error,

    since the user_id variable is not defined anywhere

    Any help?

     

    from myspace.app import Consumer, MySpaceError

    security_key = '*************
    consumer = Consumer('http://mpellos.velti.net', security_key)
    try:
      user = consumer.user(user_id)
    except MySpaceError, mse:
      # handle error
      print mse
      print mse.response

     

    Thanks

Page 1 of 1 (8 items)