Metadata-Version: 2.1
Name: Mastodon.py
Version: 1.8.1
Summary: Python wrapper for the Mastodon API
Home-page: https://github.com/halcy/Mastodon.py
Author: Lorenz Diener
Author-email: lorenzd+mastodonpypypi@gmail.com
License: MIT
Keywords: mastodon api microblogging
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Communications
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: requests>=2.4.2
Requires-Dist: python-dateutil
Requires-Dist: six
Requires-Dist: python-magic-bin; platform_system == "Windows"
Requires-Dist: python-magic; platform_system != "Windows"
Requires-Dist: decorator>=4.0.0
Requires-Dist: blurhash>=1.1.4
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: vcrpy; extra == "test"
Requires-Dist: pytest-vcr; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: requests-mock; extra == "test"
Requires-Dist: pytz; extra == "test"
Requires-Dist: http_ece>=1.0.5; extra == "test"
Requires-Dist: cryptography>=1.6.0; extra == "test"
Requires-Dist: blurhash>=1.1.4; extra == "test"
Provides-Extra: webpush
Requires-Dist: http_ece>=1.0.5; extra == "webpush"
Requires-Dist: cryptography>=1.6.0; extra == "webpush"
Provides-Extra: blurhash
Requires-Dist: blurhash>=1.1.4; extra == "blurhash"

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

.. code-block:: python

    from mastodon import Mastodon

    # Register your app! This only needs to be done once (per server, or when 
    # distributing rather than hosting an application, most likely per device and server). 
    # Uncomment the code and substitute in your information:
    '''
    Mastodon.create_app(
        'pytooterapp',
        api_base_url = 'https://mastodon.social',
        to_file = 'pytooter_clientcred.secret'
    )
    '''

    # Then, log in. This can be done every time your application starts (e.g. when writing a 
    # simple bot), or you can use the persisted information:
    mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',)
    mastodon.log_in(
        'my_login_email@example.com', 
        'incrediblygoodpassword', 
        to_file = 'pytooter_usercred.secret'
    )

    # Note that this won't work when using 2FA - you'll have to use OAuth, in that case. 
    # To post, create an actual API instance:
    mastodon = Mastodon(access_token = 'pytooter_usercred.secret')
    mastodon.toot('Tooting from Python using #mastodonpy !')

You can install Mastodon.py via pypi:

.. code-block:: Bash

   # Python 3
   pip3 install Mastodon.py

We currently try to support Python 3.7 and above, and try to at least not break Python 3 versions
below that. Python 2 support is no longer a goal.

Full documentation and basic usage examples can be found
at https://mastodonpy.readthedocs.io/en/stable/ . Some more extensive examples can be
found at https://github.com/halcy/MastodonpyExamples

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:: https://circleci.com/gh/halcy/Mastodon.py.svg?style=svg
    :target: https://app.circleci.com/pipelines/github/halcy/Mastodon.py
.. image:: https://codecov.io/gh/halcy/Mastodon.py/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/halcy/Mastodon.py

