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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
project-utils-config-1.2.3.tar.gz
(45.1 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-config-1.2.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae790888a9936ed2dfbb0975ae8d669dd79056beb8fae281a224e0a13352a3de |
|
MD5 | bd2dfbd3c2a65096b332e10e8f946a41 |
|
BLAKE2b-256 | 414e332bf0edefc8f7864235fef0965e9ebe02672cf720d1026938bd945c593d |
Close
Hashes for project_utils_config-1.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10a5d81350ce3d26671ac871f703a1a6da8aa546a6011627652d76fec56a7658 |
|
MD5 | 1606f6c78579fd91473234e48b22965f |
|
BLAKE2b-256 | 17f546d74a736c17e1c061b6404feb5b4b9f3fd2e2d6235b3f68eff5b50b2a8b |