mastodon.py

Python wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API.

https://github.com/halcy/mastodon.py

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 85 committers (2.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

api api-client api-rest mastodon mastodon-api mastodon-app mastodon-client social social-network

Keywords from Contributors

alignment flexible
Last synced: 6 months ago · JSON representation ·

Repository

Python wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API.

Basic Info
  • Host: GitHub
  • Owner: halcy
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 50.8 MB
Statistics
  • Stars: 936
  • Watchers: 29
  • Forks: 161
  • Open Issues: 2
  • Releases: 31
Topics
api api-client api-rest mastodon mastodon-api mastodon-app mastodon-client social social-network
Created about 9 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Citation Security

README.rst

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

Owner

  • Name: Lorenz Diener
  • Login: halcy
  • Kind: user
  • Location: Germany
  • Company: Microsoft

Citation (CITATION.cff)

cff-version: 1.2.0
message: Please cite the following works when using this software.
type: software
abstract: Python wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API.
authors:
  - family-names: Diener
    given-names: Lorenz
  - family-names: codl
  - family-names: Rittner
    given-names: Aljoscha
  - family-names: Šedivý
    given-names: Miroslav
  - name: aeonofdiscord
  - family-names: Myers
    given-names: Elizabeth
  - family-names: Piper
    given-names: Andy
  - name: golint fixer
  - family-names: Lain
  - family-names: Bram
  - family-names: Kawamoto
    given-names: Junpei
  - family-names: Detiste
    given-names: Alexandre
  - family-names: Dunstone
    given-names: Gareth
  - family-names: Conscience
    given-names: GCU Prosthetic
  - family-names: Eaton
    given-names: Mark
  - family-names: Thompson
    given-names: Will
  - family-names: Fraser
    given-names: James
  - family-names: Arm
    given-names: Jeong
  - family-names: naoya_t
  - name: theo court
  - family-names: Calvar
    given-names: Théo Le
  - family-names: Anthony
    given-names: Noëlle
  - family-names: Moore
    given-names: James
  - family-names: Laxson
    given-names: Jack
  - family-names: Ciesla
    given-names: Gwyn
  - family-names: Piesche
    given-names: Florian
  - family-names: Anzorge
    given-names: Dee
  - family-names: Mohanan
    given-names: Ashwin V.
identifiers:
  - type: url
    value: https://github.com/halcy/Mastodon.py
title: halcy/Mastodon.py
url: https://github.com/halcy/Mastodon.py

GitHub Events

Total
  • Create event: 3
  • Release event: 4
  • Issues event: 72
  • Watch event: 61
  • Delete event: 1
  • Issue comment event: 142
  • Push event: 89
  • Pull request event: 18
  • Fork event: 22
Last Year
  • Create event: 3
  • Release event: 4
  • Issues event: 72
  • Watch event: 61
  • Delete event: 1
  • Issue comment event: 142
  • Push event: 89
  • Pull request event: 18
  • Fork event: 22

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 961
  • Total Committers: 85
  • Avg Commits per committer: 11.306
  • Development Distribution Score (DDS): 0.513
Past Year
  • Commits: 85
  • Committers: 11
  • Avg Commits per committer: 7.727
  • Development Distribution Score (DDS): 0.306
Top Committers
Name Email Commits
Lorenz Diener l****d@g****m 468
halcy h****y@A****N 220
codl c****l@c****r 78
Lorenz Diener h****n@h****e 15
Aljoscha Rittner a****r@i****e 11
halcy h****y@A****n 9
Miroslav Šedivý 6****o 8
Elizabeth Myers e****h@i****e 6
lefherz e****z@f****e 6
Alex McGivern a****x@a****m 5
Ansem a****1@g****m 5
micah 4****t 5
Erin Congden e****n@g****m 5
Laurent Peuch c****x@w****e 4
Junpei Kawamoto k****i@g****m 4
Andy Piper a****r 4
Alexandre Detiste a****e@g****m 4
Chronister a****r@g****m 3
Lydia l****s@a****u 3
Gareth Dunstone f****e@g****m 3
Anna “CyberTailor” c****r@s****n 3
Andrés Ignacio Torres a****m@g****m 3
Alex Camilleri c****x@g****m 3
Jason McBrayer j****y@c****t 3
MarkEEaton M****n 3
Will Thompson w****l@w****k 3
fwaggle f****e@f****g 3
kjwon15 k****l@g****m 3
D Anzorge d****e@g****m 2
Florian Piesche f****n@y****t 2
and 55 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 257
  • Total pull requests: 161
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 167
  • Total pull request authors: 88
  • Average comments per issue: 2.86
  • Average comments per pull request: 1.89
  • Merged pull requests: 137
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 29
  • Pull requests: 13
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 17 days
  • Issue authors: 26
  • Pull request authors: 10
  • Average comments per issue: 2.21
  • Average comments per pull request: 2.15
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • halcy (26)
  • codl (11)
  • ghost (7)
  • foxmask (7)
  • jfmcbrayer (6)
  • FlyMyPG (4)
  • allo- (4)
  • brrzap (3)
  • arittner (3)
  • jeancf (3)
  • edent (3)
  • andypiper (3)
  • RedactedCode (3)
  • bortzmeyer (3)
  • zcutlip (2)
Pull Request Authors
  • codl (20)
  • arittner (7)
  • eumiro (6)
  • Elizafox (5)
  • Psycojoker (5)
  • azillion (4)
  • halcy (4)
  • dependabot[bot] (4)
  • lefherz (3)
  • chr-1x (3)
  • keponk (3)
  • leahoswald (2)
  • CyberTailor (2)
  • tribela (2)
  • brrzap (2)
Top Labels
Issue Labels
enhancement (9) question (5) bug (2) help wanted (1)
Pull Request Labels
dependencies (4)

Packages

  • Total packages: 14
  • Total downloads:
    • pypi 203,171 last-month
  • Total docker downloads: 8
  • Total dependent packages: 13
    (may contain duplicates)
  • Total dependent repositories: 88
    (may contain duplicates)
  • Total versions: 74
  • Total maintainers: 2
pypi.org: mastodon.py

Python wrapper for the Mastodon API

  • Versions: 39
  • Dependent Packages: 13
  • Dependent Repositories: 87
  • Downloads: 203,171 Last month
  • Docker Downloads: 8
Rankings
Dependent packages count: 0.7%
Downloads: 1.5%
Dependent repos count: 1.6%
Average: 2.0%
Stargazers count: 2.2%
Forks count: 4.0%
Maintainers (1)
Last synced: 6 months ago
proxy.golang.org: github.com/halcy/mastodon.py
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.7%
Average: 5.9%
Dependent repos count: 6.1%
Last synced: 6 months ago
proxy.golang.org: github.com/halcy/Mastodon.py
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.7%
Average: 5.9%
Dependent repos count: 6.1%
Last synced: 6 months ago
alpine-edge: py3-mastodon.py-pyc

Precompiled Python bytecode for py3-mastodon.py

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 8.8%
Forks count: 10.8%
Stargazers count: 11.0%
Dependent packages count: 13.2%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-mastodon.py

Python wrapper for the Mastodon API

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 9.0%
Forks count: 10.6%
Stargazers count: 11.0%
Dependent packages count: 14.6%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: mastodon.py
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Stargazers count: 14.7%
Forks count: 15.5%
Dependent repos count: 24.1%
Average: 26.4%
Dependent packages count: 51.5%
Last synced: 6 months ago
alpine-v3.21: py3-mastodon.py

Python wrapper for the Mastodon API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.21: py3-mastodon.py-pyc

Precompiled Python bytecode for py3-mastodon.py

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.20: py3-mastodon.py

Python wrapper for the Mastodon API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.19: py3-mastodon.py

Python wrapper for the Mastodon API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.22: py3-mastodon.py

Python wrapper for the Mastodon API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.19: py3-mastodon.py-pyc

Precompiled Python bytecode for py3-mastodon.py

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 6 months ago
alpine-v3.22: py3-mastodon.py-pyc

Precompiled Python bytecode for py3-mastodon.py

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.20: py3-mastodon.py-pyc

Precompiled Python bytecode for py3-mastodon.py

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago

Dependencies

Pipfile pypi
  • mastodon-py * develop
  • pytest <4 develop
  • pytest-cov * develop
  • pytest-mock * develop
  • pytest-runner * develop
  • pytest-vcr <1 develop
  • requests-mock * develop
  • vcrpy * develop
Pipfile.lock pypi
  • atomicwrites ==1.3.0 develop
  • attrs ==19.1.0 develop
  • certifi ==2019.6.16 develop
  • chardet ==3.0.4 develop
  • coverage ==4.5.3 develop
  • decorator ==4.4.0 develop
  • idna ==2.8 develop
  • importlib-metadata ==0.18 develop
  • mastodon-py * develop
  • more-itertools ==7.2.0 develop
  • multidict ==4.5.2 develop
  • pluggy ==0.12.0 develop
  • py ==1.8.0 develop
  • pytest ==3.10.1 develop
  • pytest-cov ==2.7.1 develop
  • pytest-mock ==1.10.4 develop
  • pytest-runner ==5.1 develop
  • pytest-vcr ==0.3.0 develop
  • python-dateutil ==2.8.0 develop
  • python-magic ==0.4.15 develop
  • pytz ==2019.1 develop
  • pyyaml ==5.1.1 develop
  • requests ==2.22.0 develop
  • requests-mock ==1.6.0 develop
  • six ==1.12.0 develop
  • urllib3 ==1.25.3 develop
  • vcrpy ==2.0.1 develop
  • wrapt ==1.11.2 develop
  • yarl ==1.3.0 develop
  • zipp ==0.5.2 develop
setup.py pypi
  • decorator >=4.0.0
  • python-dateutil *
  • python-magic *
  • pytz *
  • requests >=2.4.2
  • six *