Advertisement

Your Ad could be here. I want to connect my readers to relavant ads. If you have a product targeted at developers, let's talk. [email protected]

Here's my thought on Mastodon.py — Mastodon.py 1.8.1 documentation


Mastadon.py is a python api client for mastadon that makes it easy to cross post to mastadon.


from mastodon import Mastodon

Mastodon.create_app(
    'pytooterapp',
    api_base_url = 'https://mastodon.social',
    to_file = 'pytooter_clientcred.secret'
)

from mastodon import Mastodon

mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',)
mastodon.log_in(
    '[email protected]',
    'incrediblygoodpassword',
    to_file = 'pytooter_usercred.secret'
)

mastodon.toot('Tooting from Python using #mastodonpy !')

This post was a thought by Waylon Walker see all my thoughts at https://waylonwalker.com/thoughts