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.11.tar.gz
(28.7 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-2023-0.3.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3d2360ea2a33ae798635a90a6045f01fa508d99914144063954ddda28c45a07 |
|
MD5 | fc761a3415d19b65dafc2712363a9130 |
|
BLAKE2b-256 | 6a01d61e5837f15da120feda334fbbea272cbc1950edfaf22a762fff9b4907e6 |
Close
Hashes for project_utils_2023-0.3.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9804425de4c9f7e4b1ec4dcb21b11aa9088da58ee9ce3aa20ddbf28000b1c301 |
|
MD5 | 7a19ce6407142e03af38f620dfc8f3af |
|
BLAKE2b-256 | 6b5a602805a6bcda57238fc84f58085d166d0c3e549a60d7047b52aeadfadb00 |