# project-utils
#### 介绍
project-utils 基于python3 的工具包
#### 软件架构
使用时继承相应类即可
#### 安装教程
```shell
pip3 install 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 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-config",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, utils, project utils",
"author": "mylx2014",
"author_email": "mylx2014@163.com",
"download_url": "https://files.pythonhosted.org/packages/9a/ef/d6ecd6b76834d4568199c3884124d5504f4f987d5793205d7c3f303d2ab8/project-utils-config-2.0.0.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-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 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,version from 2.0.0",
"version": "2.0.0",
"project_urls": {
"Homepage": "https://gitee.com/mylx2014/project-utils.git"
},
"split_keywords": [
"python",
" utils",
" project utils"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "765c6fce7ec3cbc46b93c48f71b7a1390f4079b37cfea838a5818fcff8582f07",
"md5": "50faa3929a3cfe8fd45e5c2da6cf3599",
"sha256": "38874504dc6948093c1cfd7318c98a0db9d70ae9cfa7cb86c782146df089adee"
},
"downloads": -1,
"filename": "project_utils_config-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "50faa3929a3cfe8fd45e5c2da6cf3599",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 128157,
"upload_time": "2024-10-20T07:37:11",
"upload_time_iso_8601": "2024-10-20T07:37:11.068392Z",
"url": "https://files.pythonhosted.org/packages/76/5c/6fce7ec3cbc46b93c48f71b7a1390f4079b37cfea838a5818fcff8582f07/project_utils_config-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9aefd6ecd6b76834d4568199c3884124d5504f4f987d5793205d7c3f303d2ab8",
"md5": "3e8b007e9fa5e297c0effdeca46fa632",
"sha256": "8c73a216617471cb1b4142903f625d0c192ebf709c3288bf09d48dc20f565f04"
},
"downloads": -1,
"filename": "project-utils-config-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "3e8b007e9fa5e297c0effdeca46fa632",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 52591,
"upload_time": "2024-10-20T07:37:07",
"upload_time_iso_8601": "2024-10-20T07:37:07.674828Z",
"url": "https://files.pythonhosted.org/packages/9a/ef/d6ecd6b76834d4568199c3884124d5504f4f987d5793205d7c3f303d2ab8/project-utils-config-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-20 07:37:07",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "project-utils-config"
}