Build your own Mastodon client

Conclusion

As mentioned elsewhere, creating a basic Mastodon reader is dirt simple with Mastodon.py. Making it attractive is another matter, but that is like everything: Your mileage will vary according to how far you want to go and how many features you want to pack into your client.

However, there is one thing you must always be aware: Different nodes in the Mastodon network implement different versions of the Mastodon server software. And different versions implement slightly different features or implement similar features in slightly different ways. Check what version your instance is running with Mastodon.py's Mastodon.instance() function [5].

Also bear in mind that the administrator can enable or lock down certain features, so don't expect all the API's features to work everywhere.

In the next issue, we'll see how to build an application that lets you post toots and even schedule toots for later posting. See you then!

Infos

  1. Mastodon: https://joinmastodon.org/
  2. "Tutorial – Mastodon Clients" by Paul Brown, Linux Magazine, issue 228, November 2019, pp. 92-95
  3. Mastodon.py documentation: https://mastodonpy.readthedocs.io/en/stable/index.html
  4. "Welcome to the Fediverse" by Paul Brown, Linux Magazine, issue 227, October 2019, pp. 90-94: http://www.linux-magazine.com/Issues/2019/227/Tutorial-Fediverse
  5. Mastodon.instance: https://mastodonpy.readthedocs.io/en/stable/index.html#reading-data-instances

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Social Skills

    Creating a custom application that toots text to Mastodon (the Fediverse's version of Twitter) is simple and straightforward. But we can mix it up by adding images and video, scheduling posts, and changing privacy settings.

  • toot

    If you are looking for a Twitter alternative, toot lets you interact with Mastodon from the command line.

  • Tutorial – Fediverse

    If you're looking for social media options where the user has more control, you'll find a range of options to explore in the Fediverse, including the popular Mastodon.

  • Mastodon Clients Post Line

    The open and simple Mastodon API makes it easy to create applications to interact with this federated microblogging platform. Here are some of the clients that the community has come up with and how you can use them.

  • Mastodon

    Get started with free microblogging, interact with others who share you interests, and even help expand the Fediverse with your own Mastodon instance.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News