Skip to content

Commit

Permalink
Add forgotten doc file
Browse files Browse the repository at this point in the history
  • Loading branch information
humrochagf committed Dec 10, 2023
1 parent 349fe6f commit da75a1b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/pods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Pods

The core of Wheke's modularity lies on the `Pod` class.

Once you have your code ready you can bundle it in a Pod to be plugged in Wheke:

```python hl_lines="12 15"
from fastapi import APIRouter
from wheke import Pod, Wheke

router = APIRouter()


@router.get("/hello")
def hello() -> dict:
return {"hello": "world"}


my_pod = Pod("my-pod", router=router) # Create the pod

wheke = Wheke()
wheke.add_pod(my_pod) # Add the pod to wheke

app = wheke.create_app()
```

## Ready to use Pods

Pods can be developed and published as a package for other to use.

These are examples of pods that offer ready to use functionalities:

- [wheke-auth](https://github.com/humrochagf/wheke-auth): A Pod that adds auth to Wheke.

0 comments on commit da75a1b

Please sign in to comment.