Mastodon.py


NameMastodon.py JSON
Version 2.0.0 PyPI version JSON
download
home_pageNone
SummaryPython wrapper for the Mastodon API
upload_time2025-02-15 20:55:48
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT
keywords mastodon api microblogging
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Mastodon.py
===========
Python wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API.
Feature complete for public API as of Mastodon version 4.3.0 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, or you can use the persisted information:
    mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',)
    print(mastodon.auth_request_url())

    # open the URL in the browser and paste the code you get
    mastodon.log_in(
        code=input("Enter the OAuth authorization code: "),
        to_file="pytooter_usercred.secret"
    )

    # 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

   pip 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


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "Mastodon.py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "mastodon, api, microblogging",
    "author": null,
    "author_email": "Lorenz Diener <lorenzd+mastodonpypypi@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b9/c0/110aad2e33a4036fb905bc2f14555d48a57511385bc217ec843451e8ef44/mastodon_py-2.0.0.tar.gz",
    "platform": null,
    "description": "Mastodon.py\n===========\nPython wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API.\nFeature complete for public API as of Mastodon version 4.3.0 and easy to get started with:\n\n.. code-block:: python\n\n    from mastodon import Mastodon\n\n    # Register your app! This only needs to be done once (per server, or when \n    # distributing rather than hosting an application, most likely per device and server). \n    # Uncomment the code and substitute in your information:\n    '''\n    Mastodon.create_app(\n        'pytooterapp',\n        api_base_url = 'https://mastodon.social',\n        to_file = 'pytooter_clientcred.secret'\n    )\n    '''\n\n    # Then, log in. This can be done every time your application starts, or you can use the persisted information:\n    mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',)\n    print(mastodon.auth_request_url())\n\n    # open the URL in the browser and paste the code you get\n    mastodon.log_in(\n        code=input(\"Enter the OAuth authorization code: \"),\n        to_file=\"pytooter_usercred.secret\"\n    )\n\n    # To post, create an actual API instance:\n    mastodon = Mastodon(access_token = 'pytooter_usercred.secret')\n    mastodon.toot('Tooting from Python using #mastodonpy !')\n\nYou can install Mastodon.py via pypi:\n\n.. code-block:: Bash\n\n   pip install Mastodon.py\n\nWe currently try to support Python 3.7 and above, and try to at least not break Python 3 versions\nbelow that. Python 2 support is no longer a goal.\n\nFull documentation and basic usage examples can be found\nat https://mastodonpy.readthedocs.io/en/stable/ . Some more extensive examples can be\nfound at https://github.com/halcy/MastodonpyExamples\n\nAcknowledgements\n----------------\nMastodon.py contains work by a large amount of contributors, many of which have\nput significant work into making it a better library. You can find some information\nabout who helped with which particular feature or fix in the changelog.\n\n.. image:: https://circleci.com/gh/halcy/Mastodon.py.svg?style=svg\n    :target: https://app.circleci.com/pipelines/github/halcy/Mastodon.py\n.. image:: https://codecov.io/gh/halcy/Mastodon.py/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/halcy/Mastodon.py\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python wrapper for the Mastodon API",
    "version": "2.0.0",
    "project_urls": {
        "Documentation": "https://mastodonpy.readthedocs.io/",
        "Repository": "https://github.com/halcy/Mastodon.py"
    },
    "split_keywords": [
        "mastodon",
        " api",
        " microblogging"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "16c15b76c5c0ffe3b2454264c56899f58dd293049b9f17d78d34b52474187e35",
                "md5": "094ac8bf57a55343011fcb950d2e5e13",
                "sha256": "b2f08ffc19bf93db2cd2b7f11d785e847cd09d20127004de1aa089d20d402478"
            },
            "downloads": -1,
            "filename": "Mastodon.py-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "094ac8bf57a55343011fcb950d2e5e13",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 108221,
            "upload_time": "2025-02-15T20:55:42",
            "upload_time_iso_8601": "2025-02-15T20:55:42.629005Z",
            "url": "https://files.pythonhosted.org/packages/16/c1/5b76c5c0ffe3b2454264c56899f58dd293049b9f17d78d34b52474187e35/Mastodon.py-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b9c0110aad2e33a4036fb905bc2f14555d48a57511385bc217ec843451e8ef44",
                "md5": "79d4e2860c9721b152a212cf872978c3",
                "sha256": "34f45aee283bda437f16d512d9a5c7f2cf39b427bff7282ac0a82339d65ed8c7"
            },
            "downloads": -1,
            "filename": "mastodon_py-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "79d4e2860c9721b152a212cf872978c3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11064940,
            "upload_time": "2025-02-15T20:55:48",
            "upload_time_iso_8601": "2025-02-15T20:55:48.702703Z",
            "url": "https://files.pythonhosted.org/packages/b9/c0/110aad2e33a4036fb905bc2f14555d48a57511385bc217ec843451e8ef44/mastodon_py-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-15 20:55:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "halcy",
    "github_project": "Mastodon.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "tox": true,
    "lcname": "mastodon.py"
}
        
Elapsed time: 0.67708s