Python wrapper for the Akkoma ( https://akkoma.dev/AkkomaGang/akkoma ) API. (WIP)
Go to file
spla 05ebc69894 Add LICENSE and README.md 2022-07-24 21:14:42 +02:00
LICENSE Add LICENSE and README.md 2022-07-24 21:14:42 +02:00
README.md Add LICENSE and README.md 2022-07-24 21:14:42 +02:00
akkoma.py Python wrapper for the Akkoma API 2022-07-24 20:46:57 +02:00

README.md

Akkoma.py

Python wrapper for the Akkoma (https://akkoma.dev/AkkomaGang/akkoma)[https://akkoma.dev/AkkomaGang/akkoma] API.

.. code-block:: python

# Register your app! This only needs to be done once. Uncomment the code and substitute in your information.

from akkoma import Akkoma

'''
Akkoma.create_app(
     'pytooterapp',
     api_base_url = 'https://yourakkomainstance.social',
     to_file = 'pytooter_clientcred.secret'
)
'''

# Then login. This can be done every time, or use persisted.

from akkoma import Akkoma

akkoma = Akkoma(
    client_id = 'pytooter_clientcred.secret',
    api_base_url = 'https://yourakkomainstance.social'
)
akkoma.log_in(
    'my_login_email@example.com',
    'incrediblygoodpassword',
    to_file = 'pytooter_usercred.secret'
)

# To post, create an actual API instance.

from akkoma import Akkoma

akkoma = Akkoma(
    access_token = 'pytooter_usercred.secret',
    api_base_url = 'https://yourakkomainstance.social'
)
akkoma.status_post('Tooting from python using #akkomapy !')