Add LICENSE and README.md

This commit is contained in:
spla 2022-07-24 21:14:42 +02:00
pare 68f967507e
commit 05ebc69894
S'han modificat 2 arxius amb 63 adicions i 0 eliminacions

21
LICENSE Normal file
Veure arxiu

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016 Lorenz Diener / Mastodon.py contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

42
README.md Normal file
Veure arxiu

@ -0,0 +1,42 @@
# 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 !')