# 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-django.git",
"name": "project-utils-django",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, utils, project utils, aiofiles",
"author": "mylx2014",
"author_email": "mylx2014@163.com",
"download_url": "https://files.pythonhosted.org/packages/70/f4/9fefe116f2d18c68b0a734b2cea469787bbda9820717e79abea6153c51a6/project-utils-django-1.0.7.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.7",
"project_urls": {
"Homepage": "https://gitee.com/mylx2014/project-utils-django.git"
},
"split_keywords": [
"python",
" utils",
" project utils",
" aiofiles"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e988c150ba9d49ac79d16e80b7641947095766be467f66f323acba93f63ccb3c",
"md5": "08d7256aed73f3a3a3a2adb3bee98250",
"sha256": "6e7c1a8c1b4733ac18a0a6b32b733779a077a83a323e389a1b438debe3aec59d"
},
"downloads": -1,
"filename": "project_utils_django-1.0.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "08d7256aed73f3a3a3a2adb3bee98250",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 56079,
"upload_time": "2024-04-17T01:44:51",
"upload_time_iso_8601": "2024-04-17T01:44:51.420059Z",
"url": "https://files.pythonhosted.org/packages/e9/88/c150ba9d49ac79d16e80b7641947095766be467f66f323acba93f63ccb3c/project_utils_django-1.0.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "70f49fefe116f2d18c68b0a734b2cea469787bbda9820717e79abea6153c51a6",
"md5": "19a438574a9f96e1994d12cb3fccefb2",
"sha256": "012a7113b1490f0ba3c565276e7abb4300f8c02564fd6e17750cf73d8d1528f2"
},
"downloads": -1,
"filename": "project-utils-django-1.0.7.tar.gz",
"has_sig": false,
"md5_digest": "19a438574a9f96e1994d12cb3fccefb2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 28935,
"upload_time": "2024-04-17T01:44:44",
"upload_time_iso_8601": "2024-04-17T01:44:44.808175Z",
"url": "https://files.pythonhosted.org/packages/70/f4/9fefe116f2d18c68b0a734b2cea469787bbda9820717e79abea6153c51a6/project-utils-django-1.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-17 01:44:44",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "project-utils-django"
}