1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
Metadata-Version: 2.4
Name: Mastodon.py
Version: 2.1.3
Summary: Python wrapper for the Mastodon API
Author-email: Lorenz Diener <lorenzd+mastodonpypypi@gmail.com>
License: MIT
Project-URL: Repository, https://github.com/halcy/Mastodon.py
Project-URL: Documentation, https://mastodonpy.readthedocs.io/
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: 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: 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"
Provides-Extra: grapheme
Requires-Dist: grapheme>=0.6.0; extra == "grapheme"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: vcrpy; extra == "test"
Requires-Dist: pytest-recording; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: requests-mock; extra == "test"
Requires-Dist: pytz; extra == "test"
Requires-Dist: pytest-retry; extra == "test"
Provides-Extra: test-old
Requires-Dist: pytest; extra == "test-old"
Requires-Dist: pytest-cov; extra == "test-old"
Requires-Dist: vcrpy; extra == "test-old"
Requires-Dist: pytest-recording; extra == "test-old"
Requires-Dist: pytest-mock; extra == "test-old"
Requires-Dist: requests-mock; extra == "test-old"
Requires-Dist: pytz; extra == "test-old"
Provides-Extra: docs
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Dynamic: license-file
Mastodon.py
===========
Python wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API.
Feature complete for public API as of Mastodon version 4.4.3 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
If you have any questions about using the library or think you have found a bug,
please feel free to open an issue, a github discussion thread, or to just directly
contact @halcy@icosahedron.website on the Fediverse or .halcy on Discord - we'll
try to respond as quickly as possible.
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
|