mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 16:21:28 +00:00
add fastapi driver, config
This commit is contained in:
27
nonebot/drivers/__init__.py
Normal file
27
nonebot/drivers/__init__.py
Normal file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from typing import Optional
|
||||
from ipaddress import IPv4Address
|
||||
|
||||
|
||||
class BaseDriver(object):
|
||||
|
||||
@property
|
||||
def server_app(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def asgi(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def logger(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def run(self,
|
||||
host: Optional[IPv4Address] = None,
|
||||
port: Optional[int] = None,
|
||||
*args,
|
||||
**kwargs):
|
||||
raise NotImplementedError
|
Reference in New Issue
Block a user