Python wrapper for the [Akkoma](https://akkoma.dev/AkkomaGang/akkoma) API.
Project description
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 !')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Akkoma.py-0.1.4.tar.gz
(15.0 kB
view hashes)
Built Distribution
Akkoma.py-0.1.4-py3-none-any.whl
(15.1 kB
view hashes)
Close
Hashes for Akkoma.py-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 502e9b6f0d799fbc487837ccefc4bc1e0139e40d1ebddfdc3435910dd36974e2 |
|
MD5 | 7b42d3f817de9290d70c7de897ad9bab |
|
BLAKE2b-256 | 3edec9134606995cc540047130090a4140f58993510e51300da72b7230aa039f |