Files
arbina-vue-apps-libs/vue-apps-py/README.MD
2022-12-15 18:31:39 +03:00

34 lines
897 B
Markdown

# vue-apps-py
This is a library provided as a building block for your Vue Apps written on Python 3
You will probably need to install ***uvicorn*** to launch a server built with FastAPI
```shell
python3 -m pip install "uvicorn[standard]"
```
After importing an app such as `main.py`:
```python
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
# 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 test:vue_app --reload
```