How to import tumblpy properly?

478 views
Skip to first unread message

Victor Velletti

unread,
Jan 1, 2014, 6:36:10 AM1/1/14
to tumbl...@googlegroups.com
Hi, I installed tumlpy with 

ubuntu@ip-172-31-47-182:~$ sudo easy_install python-tumblpy
Searching for python-tumblpy
Best match: python-tumblpy 1.0.2
...
Best match: requests-oauthlib 0.3.2
...
Best match: requests 1.2.2
...
Best match: oauthlib 0.6.0
...
Finished processing dependencies for python-tumblpy



Then I wrote a small file based on API console

#!/usr/bin/python

import tumblpy
import json
import oauth
import sys

client = pytumblr.TumblrRestClient(
  'xxxx',
  'xxx',
  'xxx',
  'xxx'
)

client.posts('blabla.tumblr.com', offset=0, filter='raw')


------

I get error

ubuntu@ip-172-31-47-182:~/tumblr$ python first.py
Traceback (most recent call last):
  File "first.py", line 8, in <module>
    client = pytumblr.TumblrRestClient(
NameError: name 'pytumblr' is not defined

------

How do I import pytumblr? What am I doing wrong?


John Bunting

unread,
Jan 2, 2014, 9:41:30 AM1/2/14
to tumbl...@googlegroups.com
This is not the official version of the python library (which is called pytumblr) as far as I can tell, but it looks to me like you should check here: https://pypi.python.org/pypi/python-tumblpy/1.0.2

I'm assuming that it's actually import tumblpy

If you want to use pytumblr you'll need to "pip install pytumblr"


--
You received this message because you are subscribed to the Google Groups "Tumblr API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tumblr-api+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
John Bunting

Simplicity is prerequisite for reliability
    --Edsger W. Dijkstra

Reply all
Reply to author
Forward
0 new messages