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.2.tar.gz
(29.7 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-config-1.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb39f23727ef4e4089f83d53671d5785dcba4129524d54a0b6af78e4da137b6c |
|
MD5 | 76dc3e8b8ffe8c20f2405a230b10aa36 |
|
BLAKE2b-256 | 9369f121d5420e14ada76a2983486773c6c2d6a3e53d6f8bc61d388432f25547 |
Close
Hashes for project_utils_config-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da33aa45abc2072e1bff37dcb89b09da0fda6a4c078fff87a9b8aa0677e298a9 |
|
MD5 | adf953716f0d16b435857f897eeeb64c |
|
BLAKE2b-256 | 9c0ab1c3b315952ba9a4f4c6b65f8ec6cab7409c23ade9ec9d9930349eb9422e |