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.7.tar.gz
(29.6 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-config-1.1.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdc8aa323061d09501220ed0378acae98b7217dff97488fd2d759deb378cf41e |
|
MD5 | 17519a962f155a93487baf12b2d4ae0b |
|
BLAKE2b-256 | a7959718d813c5d2261860d19feabbb214ed9366f46d2c483afffd1ed1a9f021 |
Close
Hashes for project_utils_config-1.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60ff8c101cd5598628458254e9f165ba0425438741448c9306387b2339e56f79 |
|
MD5 | 55970908260dd024f93db81ffcae5b89 |
|
BLAKE2b-256 | a4407c8a4a8acc9d62dd42a829975c92e32d5595b6ced46a3a67c3fca68bb061 |