Giter Site home page Giter Site logo

mastodon.py's Introduction

Mastodon.py

from mastodon import Mastodon

# Register app - only once!
'''
Mastodon.create_app(
     'pytooterapp',
     api_base_url = 'https://mastodon.social',
     to_file = 'pytooter_clientcred.secret'
)
'''

# Log in - either every time, or use persisted
'''
mastodon = Mastodon(
    client_id = 'pytooter_clientcred.secret',
    api_base_url = 'https://mastodon.social'
)
mastodon.log_in(
    '[email protected]',
    'incrediblygoodpassword',
    to_file = 'pytooter_usercred.secret'
)
'''

# Create actual API instance
mastodon = Mastodon(
    client_id = 'pytooter_clientcred.secret', 
    access_token = 'pytooter_usercred.secret',
    api_base_url = 'https://mastodon.social'
)
mastodon.toot('Tooting from python using #mastodonpy !')

Python wrapper for the Mastodon ( https://github.com/tootsuite/mastodon/ ) API. Feature complete for public API as of Mastodon version 2.2.0 and easy to get started with.

You can install Mastodon.py via pypi:

# Python 2
pip install Mastodon.py

# Python 3
pip3 install Mastodon.py

Full documentation and basic usage examples can be found at http://mastodonpy.readthedocs.io/en/latest/ .

Acknowledgements

Mastodon.py contains work by a large amount of contributors, many of which have put significant work into making it a better library. You can find some information about who helped with which particular feature or fix in the changelog.

image

image

mastodon.py's People

Contributors

halcy avatar codl avatar aeonofdiscord avatar elizafox avatar golint-fixer avatar erinolivia avatar psycojoker avatar wjt avatar brrzap avatar fpiesche avatar foozmeat avatar joyeusenoelle avatar tribela avatar naoyat avatar csu avatar deeunderscore avatar edsu avatar eliotberriot avatar ragingscholar avatar pmlandwehr avatar bowlercaptain avatar chr-1x avatar fumi-san avatar lambadalambda avatar

Stargazers

Lugh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.