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-2023-0.3.18.tar.gz
(28.9 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-2023-0.3.18.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6567329a512730e17ed4e89c01ab6fd9b039fae12d4a7f7a7c778def40d1a80e |
|
MD5 | d333ecde27b3bf9f90f8829fa419a781 |
|
BLAKE2b-256 | 048abb4b638513b6216f29604d9de40947a01bb2c95bb6ebb623fe29c25f23ab |
Close
Hashes for project_utils_2023-0.3.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7adde157e1f1cd1eccb064f033b068047ae3aeeb051623df214fc6b89d993abe |
|
MD5 | 32aefd8f66e8b1895d78055fce807645 |
|
BLAKE2b-256 | 66352a6205457878816d81ece76d4810de0c24aed7580682665d238a4dc039eb |