Nyaa!! OwO what's this? *glomps you*
Project description
Tumblr-Dot-Com
OwO What's this?! Nyaa!!1
An unofficial Tumblr API client. Includes support for polls.
Install
pip install tumblrdotcom
Usage
Example
import os
from datetime import timedelta
from pprint import pprint
from tumblr import *
tumblr = Tumblr(
blog="pizza", # or 'pizza.tumblr.com'
client_key=os.getenv("CONSUMER_KEY"),
client_secret=os.getenv("CONSUMER_SECRET"),
oauth_key=os.getenv("OAUTH_TOKEN"),
oauth_secret=os.getenv("OAUTH_SECRET"),
)
response = tumblr.post(
content=(
Heading("Hello, World!"),
Text("Oh boy! Isn't it great to have a tumblr!"),
Row(
Image(
"clown_left.jpg",
"image/jpeg",
"A photo clown holding their right thumb up towards the camera"
),
Image(
"clown_right.jpg",
"image/jpeg",
"A photo clown holding their left thumb up towards the camera"
),
),
Poll(
"Don't you think so?",
["Yes", "No"],
expire_after=timedelta(days=1),
),
),
tags=["pizza", "I can't even remember why they were deleted"],
)
pprint(response)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tumblrdotcom-0.2.0.tar.gz
(7.6 kB
view hashes)
Built Distribution
Close
Hashes for tumblrdotcom-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d7945b85df87b3da5a87a7efd0286306e76ffe4e6cf58547911aa035f7b7de |
|
MD5 | 184abc5e9514d29514f5bde4e8c1e4db |
|
BLAKE2b-256 | 1c1262c29d9dcda27c9ecd29cce47f1e576af8bec9adabd9a739dba7ba3c9f6b |