Skip to main content

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.6.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

Akkoma.py-0.1.6-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file Akkoma.py-0.1.6.tar.gz.

File metadata

  • Download URL: Akkoma.py-0.1.6.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for Akkoma.py-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5eedf7dadb5fd4c948a4adb39a74ca9949b19be7ef08905b7cabe43e2f849a8e
MD5 7db2d60f94b3533da5a8d08c1c174122
BLAKE2b-256 98bd949e61ee454a58462d9255db29fd5e6b00d9d42a013583ea900f0d736a6a

See more details on using hashes here.

File details

Details for the file Akkoma.py-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: Akkoma.py-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for Akkoma.py-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 38204d36d79280baf072e19ceb60128adc64238351823244a5df604eefa465cc
MD5 701c11009c0b89f03a811312e08eb682
BLAKE2b-256 7c6bc5607b35fc3486bfbeb496968d4c3b10d2757fb9aa33a6108bfab26612d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page