python project_utils tools
Project description
project-utils
介绍
project-utils 基于python3 的工具包
软件架构
使用时继承相应类即可
安装教程
pip3 install project-project_utils-2023
使用说明
- 安装以下格式创建工程
-
config
- config.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 =
- config.ini
-
data
-
logs
-
output
-
src
-
tmp
-
example
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")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for project-utils-django-0.3.19.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8ccda9310e3c587beb7f6eb53cafe22510583eee470eec703edc8a9a195f715 |
|
MD5 | b8664729184b4090762ece4e7c1c5d18 |
|
BLAKE2b-256 | 8247f484b2941fb749b7439258bbbfaab804dfc2bfb8dccbd3aa635ff1da1bcf |
Close
Hashes for project_utils_django-0.3.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86e19bcc5885af9381df6a143a5c75359f20bfc3c593346b957a480916770f92 |
|
MD5 | 1af331a792e54cc5b63916d0785ccf5b |
|
BLAKE2b-256 | 239842b3748103452142d2cbdcd921ef49aa1c6c4da1082e7ae06116bc9560fb |