Tumblr API wrapper with support for Polls
Project description
Tumblr-Dot-Com
An unofficial Tumblr API client. Includes support for creating polls and retrieving poll results.
Install
pip install tumblrdotcom
Docs
https://tumblr-dot-com.rtfd.io
Usage
Example
import os
from datetime import timedelta
from pprint import pprint
from tumblr import *
tumblr = Blog(
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.3.1.tar.gz
(13.3 kB
view details)
Built Distribution
File details
Details for the file tumblrdotcom-0.3.1.tar.gz
.
File metadata
- Download URL: tumblrdotcom-0.3.1.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eacffd581d90277c028dcd81173a3f7578a41946a986e16fe8298d14b8a5109 |
|
MD5 | 3c98acc2b72dd1b77f7d5cb89ec8f5ab |
|
BLAKE2b-256 | 00e68ee98fc410c5f56f24fa77f1ef3f2644054059452b931dca8e2081f7d45e |
File details
Details for the file tumblrdotcom-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: tumblrdotcom-0.3.1-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1af1c26b944438ae27a01f6d566b7adcbb719d489e73f5a97cbe379b2c9ac0a |
|
MD5 | d1c128c8d2fbef2e8f7a1f53d2927b5e |
|
BLAKE2b-256 | 42c36e36d8ff5bb93e947136a4b06ed28a0ea7d11a636046452d86030bce998c |