Plugin SDK for FastAPI
The Plugin SDK nested-chat-plugin-sdk is a FastAPI extension that provides a convenient way to handle requests for creating, updating, deleting, and executing operations.
Installation
Install dependencies using Poetry and activate the virtual environment. Learn how to install Poetry
poetry install
poetry shell
Install the SDK using Poetry:
poetry add nested-chat-plugin-sdk
Example
from fastapi import FastAPI, Request
from nested_chat_plugin_sdk.sdk import PluginRouter, SyncRequest
app = FastAPI()
plugin_router = PluginRouter(api_url="")
@plugin_router.on_create
async def handle_create(data: SyncRequest):
print("create", data)
@plugin_router.on_update
async def handle_update(data: SyncRequest):
print("update", data)
@plugin_router.on_delete
async def handle_delete(data: SyncRequest):
print("delete", data)
@plugin_router.on_execute
async def handle_execute(request: Request):
print("execute", request)
app.include_router(plugin_router)
API Routes
/sync
POST: Create dataPUT: Update dataDELETE: Delete data
/execute
POST: Execute operation
SyncRequest Schema
from nested_chat_plugin_sdk.schemes import SyncRequest
class SyncRequest(BaseModel):
project: dict[str, Any]
core: dict[str, Any]
variable: dict[str, Any]
variable_enum_item: dict[str, Any] = {}
variable_group: str | None = None
Metadata
Release files for nested-chat-plugin-sdk 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nested_chat_plugin_sdk-0.1.7.tar.gz | 6.6 kB | Without provenance | Details for nested_chat_plugin_sdk-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nested_chat_plugin_sdk-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for nested_chat_plugin_sdk-0.1.7-py3-none-any.whl |
Total release size: 13.8 kB
Release files / nested_chat_plugin_sdk-0.1.7.tar.gz
| Download URL | nested_chat_plugin_sdk-0.1.7.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1237bd089ad88305e9d25ee109b97249f94b4805be3d7a14ea7ee079ca9907f7
|
|
BLAKE2b-256 checksum How to use checksums |
bf7cc5b822865bc0f558ff83c047b7409137f720fad5aa34ad6b1653a6814ece
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.6 Linux/5.15.146.1-microsoft-standard-WSL2
|
Release files / nested_chat_plugin_sdk-0.1.7-py3-none-any.whl
| Download URL | nested_chat_plugin_sdk-0.1.7-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d5216124a293e4a816a83b8e346828ba8412a08a3585944424bb6126c34d324
|
|
BLAKE2b-256 checksum How to use checksums |
638833fedc8db2640bdd2380e4264cf91be4f9d67719630febd946bfb40b25ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.6 Linux/5.15.146.1-microsoft-standard-WSL2
|
Security for nested-chat-plugin-sdk 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.