Define basic library structure
This commit is contained in:
@@ -8,18 +8,26 @@ You will probably need to install ***uvicorn*** to launch a server built with Fa
|
||||
python3 -m pip install "uvicorn[standard]"
|
||||
```
|
||||
|
||||
After importing an app such as
|
||||
|
||||
main.py:
|
||||
After importing an app such as `main.py`:
|
||||
|
||||
```python
|
||||
from vue_apps_py.vue_app_server import VueApp
|
||||
from src.vue_apps_py.security import SecurityHelper
|
||||
from src.vue_apps_py.server import VueApp
|
||||
from src.vue_apps_py.client import ClientAPI
|
||||
from src.vue_apps_py.server_utils.models import Intent
|
||||
|
||||
app = VueApp()
|
||||
# Initialize API
|
||||
api = ClientAPI(client_id='vue-app-0', client_secret='abccf12389efab222')
|
||||
|
||||
# Prepare Security
|
||||
key_holder = SecurityHelper(public_key='abbcbbbcaksjdhf/skdjhfnnsn/sjdkfjj21234=')
|
||||
|
||||
# Get Vue Application Server
|
||||
vue_app = VueApp(client_api=api, security_helper=key_holder, intents=[Intent.INLINE_QUERY], debug=True)
|
||||
```
|
||||
|
||||
You can launch web server:
|
||||
|
||||
```shell
|
||||
uvicorn main:app --reload
|
||||
uvicorn test:vue_app --reload
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user