Metadata-Version: 2.4
Name: wafpy
Version: 0.0.3
Summary: WAFRN API Wrapper written in Python
Author: maxie
License-Expression: AGPL-3.0-or-later
Project-URL: Homepage, https://codeberg.org/maxeepy/wafpy
Project-URL: Issues, https://codeberg.org/maxeepy/wafpy/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.30
Dynamic: license-file

# wafpy

A library for WAFRN api that aims to be as simple as possible

## Usage example

```py
from wafpy import Wafrn

wafrn = Wafrn(base_url = "https://waf.moe") # by default its https://app.wafrn.net
# --- or ---
wafrn = Wafrn("token here", base_url = "https://waf.moe") # you could alternatively do this

# automatically updates the Authorization header in Wafrn object
wafrn.login(
  "username@gmail.com",
  "password"
)


wafrn.get_user("maxie") # returns a User object
wafrn.get_post("01a0bb9e-cb12-77fa-8f2e-29ec417a1deb") # returns a Post object
with open("image.png", "rb") as fp:
  media = wafrn.upload_media(fp) # returns a Media object (essentially a list) with one Attachment object
wafrn.create_post("hello fediverse", media = media) # returns a Post object

# thats all for now, this package is in very early development stages, help would be appreciated
```
