Closed berkipekoglu closed 3 years ago
here is a sample script:
import json
from pytumblr import TumblrRestClient
from pprint import pprint
creds = json.load(open('./creds.json'))
client = TumblrRestClient(
creds['consumer_key'],
creds['consumer_secret'],
creds['access_token'],
creds['access_token_secret'],
)
response = client.info()
pprint(response)
it assumes that you're storing you credentials in a file formatted like so:
{
"consumer_key": "...",
"consumer_secret": "...",
"access_token": "...",
"access_token_secret": "...",
"blog": "{name}.tumblr.com"
}
please make sure not to commit the credentials file!
here is a sample script:
import json from pytumblr import TumblrRestClient from pprint import pprint creds = json.load(open('./creds.json')) client = TumblrRestClient( creds['consumer_key'], creds['consumer_secret'], creds['access_token'], creds['access_token_secret'], ) response = client.info() pprint(response)
it assumes that you're storing you credentials in a file formatted like so:
{ "consumer_key": "...", "consumer_secret": "...", "access_token": "...", "access_token_secret": "...", "blog": "{name}.tumblr.com" }
please make sure not to commit the credentials file!
Thank you so much! i know how to use now. You are wonderful.
I'm new to Python. I am trying to use Pytumblr. I installed it with
pip install pytumblr.
andI completed the steps. I entered my consumer key information.
How can I run client.info() now? I mean, how do I get pytumblr into my project and get it running?