mirror of
https://github.com/PaiGramTeam/GramCore.git
synced 2024-11-24 07:10:37 +00:00
♻️ Change to git submodule
This commit is contained in:
parent
8138e68bca
commit
b540527c68
27
README.md
27
README.md
@ -1,17 +1,22 @@
|
||||
# GramCore
|
||||
# core 目录说明
|
||||
|
||||
## 1. Overview
|
||||
## 关于 `Service`
|
||||
|
||||
telegram robot base core.
|
||||
服务 `Service` 需定义在 `services` 文件夹下, 并继承 `core.service.Service`
|
||||
|
||||
## 2. Usage
|
||||
每个 `Service` 都应包含 `start` 和 `stop` 方法, 且这两个方法都为异步方法
|
||||
|
||||
### 2.1 init project
|
||||
```python
|
||||
from core.service import Service
|
||||
|
||||
```bash
|
||||
poetry install -v
|
||||
|
||||
class TestService(Service):
|
||||
def __init__(self):
|
||||
"""do something"""
|
||||
|
||||
async def start(self, *args, **kwargs):
|
||||
"""do something"""
|
||||
|
||||
async def stop(self, *args, **kwargs):
|
||||
"""do something"""
|
||||
```
|
||||
|
||||
### 2.2 usage
|
||||
|
||||
TODO
|
||||
|
@ -1,22 +0,0 @@
|
||||
# core 目录说明
|
||||
|
||||
## 关于 `Service`
|
||||
|
||||
服务 `Service` 需定义在 `services` 文件夹下, 并继承 `core.service.Service`
|
||||
|
||||
每个 `Service` 都应包含 `start` 和 `stop` 方法, 且这两个方法都为异步方法
|
||||
|
||||
```python
|
||||
from core.service import Service
|
||||
|
||||
|
||||
class TestService(Service):
|
||||
def __init__(self):
|
||||
"""do something"""
|
||||
|
||||
async def start(self, *args, **kwargs):
|
||||
"""do something"""
|
||||
|
||||
async def stop(self, *args, **kwargs):
|
||||
"""do something"""
|
||||
```
|
@ -1 +0,0 @@
|
||||
__version__ = "0.1.0"
|
34
setup.py
34
setup.py
@ -1,34 +0,0 @@
|
||||
"""Run setuptools."""
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
from gram_core.version import __version__
|
||||
|
||||
|
||||
def get_setup_kwargs():
|
||||
"""Builds a dictionary of kwargs for the setup function"""
|
||||
kwargs = dict(
|
||||
script_name="setup.py",
|
||||
name="gram_core",
|
||||
version=__version__,
|
||||
author="PaiGramTeam",
|
||||
url="https://github.com/PaiGramTeam/GramCore",
|
||||
keywords="telegram robot base core",
|
||||
description="telegram robot base core.",
|
||||
long_description=open("README.md", "r", encoding="utf-8").read(),
|
||||
long_description_content_type="text/markdown",
|
||||
packages=find_packages(exclude=["tests*"]),
|
||||
install_requires=[],
|
||||
include_package_data=True,
|
||||
python_requires=">=3.8",
|
||||
)
|
||||
|
||||
return kwargs
|
||||
|
||||
|
||||
def main(): # skipcq: PY-D0003
|
||||
setup(**get_setup_kwargs())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue
Block a user