mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-06 20:16:47 +00:00
add http api
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from typing import Set, Union
|
||||
from ipaddress import IPv4Address
|
||||
from typing import Set, Dict, Union, Optional
|
||||
|
||||
from pydantic import BaseSettings
|
||||
|
||||
@ -15,14 +15,22 @@ class Env(BaseSettings):
|
||||
|
||||
|
||||
class Config(BaseSettings):
|
||||
# nonebot configs
|
||||
driver: str = "nonebot.drivers.fastapi"
|
||||
host: IPv4Address = IPv4Address("127.0.0.1")
|
||||
port: int = 8080
|
||||
secret: Optional[str] = None
|
||||
debug: bool = False
|
||||
|
||||
# bot connection configs
|
||||
api_root: Dict[int, str] = {}
|
||||
access_token: Optional[str] = None
|
||||
|
||||
# bot runtime configs
|
||||
superusers: Set[int] = set()
|
||||
nickname: Union[str, Set[str]] = ""
|
||||
|
||||
# custom configs
|
||||
custom_config: dict = {}
|
||||
|
||||
class Config:
|
||||
|
Reference in New Issue
Block a user