From 8b2b98d518f211e4c718197e10ad54817d665dde Mon Sep 17 00:00:00 2001 From: Victor Teo Date: Wed, 31 Jan 2024 00:33:08 +0800 Subject: [PATCH] add pyi --- py.typed | 0 pyproject.toml | 2 +- teo/__init__.pyi | 26 ++++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) delete mode 100644 py.typed create mode 100644 teo/__init__.pyi diff --git a/py.typed b/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/pyproject.toml b/pyproject.toml index 7c98f23..ec4378b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "teo" -requires-python = ">=3.7" +requires-python = ">=3.12" classifiers = [ "Programming Language :: Rust", "Programming Language :: Python :: Implementation :: CPython", diff --git a/teo/__init__.pyi b/teo/__init__.pyi new file mode 100644 index 0000000..317e397 --- /dev/null +++ b/teo/__init__.pyi @@ -0,0 +1,26 @@ +class App: + + def __init__(self): + """ + Create a new app. Only one can be present in a program. + """ + + def main_namespace(self) -> Namespace: + """ + Get the attached main namespace of the app. + """ + pass + + async def run(self): + """ + Start the app. + """ + + +class Namespace: + """ + Namespace is where handlers and models are defined. + """ + + def define_handler(self): + pass \ No newline at end of file