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.13.tar.gz
(26.9 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-2023-0.3.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23b1c1233789d1398dff905f8aa16139f290c2b2fd68c30ff94dc183a9736570 |
|
MD5 | 4d9ca34efc3edb42a2c08bcecd5c64ba |
|
BLAKE2b-256 | 5d137852e67c25f3ad69ff06a7638f329667943514f7926fd9cf97a7a7541dbf |
Close
Hashes for project_utils_2023-0.3.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94623bd72337a6a379d1003f15dc4088dd1ff4b64fa2ab6398f09725a3ae9c07 |
|
MD5 | 7b35c07aa5f6f386ae356aee0cb143d5 |
|
BLAKE2b-256 | a54ca4ae01c67af498427012fb805783cdbc4bd9a71bd65e65ec006dea53d3d3 |