Metadata-Version: 2.1
Name: Akkoma.py
Version: 0.1.1
Summary: Python wrapper for the [Akkoma](https://akkoma.dev/AkkomaGang/akkoma) API.
Home-page: https://git.mastodont.cat/pla/Akkoma.py
Author: spla
Author-email: spla@catala.digital
Project-URL: Bug Tracker, https://git.mastodont.cat/spla/Akkoma.py/issues
Keywords: akkoma api microblogging
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Communications
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# Akkoma.py
Python wrapper for the Akkoma (https://akkoma.dev/AkkomaGang/akkoma) API.  

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

    '''
    client_id, client_secret = Akkoma.create_app(
        'app_name',
        to_file="app_clientcred.txt",
        api_base_url = 'https://yourakkoma.instance'
        )
    '''

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

    from akkoma import Akkoma
    
    akkoma = Akkoma(client_id = "app_clientcred.txt", api_base_url = 'https://yourakkoma.instance')

    grant_type = 'password'

    akkoma.log_in(
        client_id,
        client_secret,
        grant_type,
        'user',
        'password',
    to_file = "app_usercred.txt"
    )   

    # To post, create an actual API instance.

    from akkoma import Akkoma
    
    akkoma = Akkoma(
        access_token = 'app_usercred.txt',
        api_base_url = 'https://yourakkoma.instance'
    )
    akkoma.status_post('Posting from python using Akkoma.py !')


