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.2.tar.gz
(45.1 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-config-1.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec17e510ca7d335f96877cf25a138823dbdc94ea7d4b3c06d1b2d7bca715fcc9 |
|
MD5 | 30c3733ed877b1bcc12af3f9685261a1 |
|
BLAKE2b-256 | 912e91fbb67348029ee527eddf89ec47a82d0011a9f71705054aae582146b9ef |
Close
Hashes for project_utils_config-1.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13291a6a1fc4693cb5100476c12b716f433143cf4eb415218854d5233ad1b363 |
|
MD5 | ea685eae34b53f6509716a81514d4176 |
|
BLAKE2b-256 | 631d772512cb84e905f98c27028c3305dca79dfab0b27415311911ac8472e89a |