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.5.tar.gz
(45.2 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-config-1.2.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e241fb9bcdd25bfde3e2940eae77a44c0bee1ffde70098933f8fda9faab4704 |
|
MD5 | a69131fb973eb02ccdf1c1cede55849f |
|
BLAKE2b-256 | ef661fd7da00d4b3dbf1f1dbe5330f53514d6ec3c3bf9069780678a46b1abdc6 |
Close
Hashes for project_utils_config-1.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9fb7ad1faa3fdf8bf0e07dbcb13b65d40f1b149338098aa8c54dcd8eb156510 |
|
MD5 | ebda537cd0c1b1c108f5e0968d830b41 |
|
BLAKE2b-256 | 6a072ad269920f4e052f54efdd9277a3a1d9fc4289b8e866c214df210c8bc08c |