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
Raw data
{
"_id": null,
"home_page": "https://github.com/halcy/Mastodon.py",
"name": "Mastodon.py",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "mastodon api microblogging",
"author": "Lorenz Diener",
"author_email": "lorenzd+mastodonpypypi@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/cc/7a/240ac474f69a58a5dda0513557fe9c2ada279f7d5d836b93d5f6e05a9aa7/Mastodon.py-1.8.1.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 3.5.5 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 (e.g. when writing a \n # simple bot), or you can use the persisted information:\n mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',)\n mastodon.log_in(\n 'my_login_email@example.com', \n 'incrediblygoodpassword', \n to_file = 'pytooter_usercred.secret'\n )\n\n # Note that this won't work when using 2FA - you'll have to use OAuth, in that case. \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 # Python 3\n pip3 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": "1.8.1",
"project_urls": {
"Homepage": "https://github.com/halcy/Mastodon.py"
},
"split_keywords": [
"mastodon",
"api",
"microblogging"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a052a97c498fbb1fd73cee5fcd3f1979efac39784e3514c4014459f174e3f22a",
"md5": "b39c3d104f544cf8fd1711f751efc856",
"sha256": "22bc7e060518ef2eaa69d911cde6e4baf56bed5ea0dd407392c49051a7ac526a"
},
"downloads": -1,
"filename": "Mastodon.py-1.8.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "b39c3d104f544cf8fd1711f751efc856",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 65936,
"upload_time": "2023-04-23T18:34:47",
"upload_time_iso_8601": "2023-04-23T18:34:47.077099Z",
"url": "https://files.pythonhosted.org/packages/a0/52/a97c498fbb1fd73cee5fcd3f1979efac39784e3514c4014459f174e3f22a/Mastodon.py-1.8.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cc7a240ac474f69a58a5dda0513557fe9c2ada279f7d5d836b93d5f6e05a9aa7",
"md5": "3961141d4c3836dd7f9a27b3ddb6aa63",
"sha256": "4a64cb94abadd6add73e4b8eafdb5c466048fa5f638284fd2189034104d4687e"
},
"downloads": -1,
"filename": "Mastodon.py-1.8.1.tar.gz",
"has_sig": false,
"md5_digest": "3961141d4c3836dd7f9a27b3ddb6aa63",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8694359,
"upload_time": "2023-04-23T18:34:51",
"upload_time_iso_8601": "2023-04-23T18:34:51.648725Z",
"url": "https://files.pythonhosted.org/packages/cc/7a/240ac474f69a58a5dda0513557fe9c2ada279f7d5d836b93d5f6e05a9aa7/Mastodon.py-1.8.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-23 18:34:51",
"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"
}