# project-utils
#### 介绍
project-utils 基于python3 的工具包
#### 软件架构
使用时继承相应类即可
#### 安装教程
```shell
pip3 install project-project_utils-2023
```
#### 使用说明
1. 安装以下格式创建工程
- config
- config.ini
```ini
[BASE]
data_url = data
log_url = logs
output_url = output
tmp_url = tmp
[MYSQL]
host =
port =
user =
password =
database =
[REDIS]
host =
port =
password =
db =
[SYSTEM]
path =
```
- data
- logs
- output
- src
- tmp
## example
```python
import asyncio
from project_utils.web.django import CeleryConfig
from new_utils import settings
class Config(CeleryConfig):
settings = settings
max_length = 256
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.loop = asyncio.get_event_loop()
def django_setting_init(self):
super().django_setting_init()
# self.settings.DEBUG = False
self.add_allowed_hosts("*")
self.add_app("rest_framework")
self.add_app("user")
self.add_middleware("middleware.my_middle.MyMiddleware")
```
Raw data
{
"_id": null,
"home_page": "https://gitee.com/mylx2014/project-utils.git",
"name": "project-utils-flask",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, utils, project utils, aiofiles, flask",
"author": "mylx2014",
"author_email": "mylx2014@163.com",
"download_url": "https://files.pythonhosted.org/packages/e6/50/7c6a606f1ea6cf13fd174813d0309d5e06f998281dd639ae4c30febe9b84/project-utils-flask-1.0.1.tar.gz",
"platform": null,
"description": "# project-utils\n\n#### \u4ecb\u7ecd\nproject-utils \u57fa\u4e8epython3 \u7684\u5de5\u5177\u5305\n\n#### \u8f6f\u4ef6\u67b6\u6784\n\u4f7f\u7528\u65f6\u7ee7\u627f\u76f8\u5e94\u7c7b\u5373\u53ef\n\n\n#### \u5b89\u88c5\u6559\u7a0b\n```shell\npip3 install project-project_utils-2023\n```\n\n#### \u4f7f\u7528\u8bf4\u660e\n1. \u5b89\u88c5\u4ee5\u4e0b\u683c\u5f0f\u521b\u5efa\u5de5\u7a0b\n - config\n - config.ini\n ```ini\n [BASE]\n data_url = data\n log_url = logs\n output_url = output\n tmp_url = tmp\n [MYSQL]\n host = \n port = \n user = \n password = \n database = \n \n [REDIS]\n host = \n port = \n password = \n db = \n \n [SYSTEM]\n path =\n ```\n\n - data\n - logs\n - output\n - src\n - tmp\n## example\n\n```python\nimport asyncio\n\nfrom project_utils.web.django import CeleryConfig\n\nfrom new_utils import settings\n\n\nclass Config(CeleryConfig):\n settings = settings\n max_length = 256\n\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self.loop = asyncio.get_event_loop()\n\n def django_setting_init(self):\n super().django_setting_init()\n # self.settings.DEBUG = False\n self.add_allowed_hosts(\"*\")\n self.add_app(\"rest_framework\")\n self.add_app(\"user\")\n self.add_middleware(\"middleware.my_middle.MyMiddleware\")\n\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "python project_utils tools",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://gitee.com/mylx2014/project-utils.git"
},
"split_keywords": [
"python",
" utils",
" project utils",
" aiofiles",
" flask"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cf7cc6bc84a4db6c033ffa38b25cce3f94d5d2fa674f10369d6af89af1137d45",
"md5": "9b4630a7e2584589ee80c08df352a8b4",
"sha256": "be4499f59b145745869a7a49f21dc0ed66afbf9c0de5e0b8fa14418a4c96bf5b"
},
"downloads": -1,
"filename": "project_utils_flask-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9b4630a7e2584589ee80c08df352a8b4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 57788,
"upload_time": "2024-06-20T10:37:15",
"upload_time_iso_8601": "2024-06-20T10:37:15.331641Z",
"url": "https://files.pythonhosted.org/packages/cf/7c/c6bc84a4db6c033ffa38b25cce3f94d5d2fa674f10369d6af89af1137d45/project_utils_flask-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e6507c6a606f1ea6cf13fd174813d0309d5e06f998281dd639ae4c30febe9b84",
"md5": "8fb45bceb187e2ae38a76a8d6bae18fc",
"sha256": "2b80264372414ce60e4a786e3bf65179ea180ffa8d421f9a072cea2625c06a4c"
},
"downloads": -1,
"filename": "project-utils-flask-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "8fb45bceb187e2ae38a76a8d6bae18fc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29836,
"upload_time": "2024-06-20T10:37:10",
"upload_time_iso_8601": "2024-06-20T10:37:10.764729Z",
"url": "https://files.pythonhosted.org/packages/e6/50/7c6a606f1ea6cf13fd174813d0309d5e06f998281dd639ae4c30febe9b84/project-utils-flask-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-20 10:37:10",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "project-utils-flask"
}