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.1.1.tar.gz
(29.7 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-config-1.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4737245b9d27c979a7da53fc98202fad214afedc4e8fa8f56799ce169856790 |
|
MD5 | 320d6a0abf02c3b4b951f7ba3c0e9811 |
|
BLAKE2b-256 | 70d6e44a330b14647ca360ad4e30c766702156abe478c5c8f313c7b7aef0e57b |
Close
Hashes for project_utils_config-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b6834559438b04c5e98926b3d4665ad59bb1f5ed9834016062006e801f092d5 |
|
MD5 | 66c6204c6386f9b395e58896a696126a |
|
BLAKE2b-256 | d4a2184786b0e536a4518221ca3063f54479a5601518ca67a0c9bcdf00bf1b6c |