Tumblr API wrapper with support for Polls
Project description
TumblrDotCom
An unofficial Tumblr API client. Includes support for creating polls and retrieving poll results.
Install
pip install tumblrdotcom
Docs
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.3.tar.gz
(16.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tumblrdotcom-0.3.3.tar.gz.
File metadata
- Download URL: tumblrdotcom-0.3.3.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ebeb998ab988a9443361db682500cdb745ccde435d1b874365d9e6e1eac18d0
|
|
| MD5 |
00f12ed00caddd30f567803a833586cd
|
|
| BLAKE2b-256 |
8ad95191f6f2c85c49f2864b72c44b6780764edec6c3094f7b88390552038cd0
|
File details
Details for the file tumblrdotcom-0.3.3-py3-none-any.whl.
File metadata
- Download URL: tumblrdotcom-0.3.3-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
076465cf4487ce8efaaca54d47902e4a6abacf28a910ebdeaadc991c3b179fbd
|
|
| MD5 |
cf48b274c1f7dc5b3535c629947aa045
|
|
| BLAKE2b-256 |
53246e76301e9f781b74491c11bb4b84cb1ce2f2521fb96391e5bb26a2417c68
|