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
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-django-1.0.1.tar.gz
(28.9 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-django-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 530ea2c6267cd79edf0dd7de98ca8ae40288e7abae218fe9c7d6d52e685cb5aa |
|
MD5 | f60da052b46ddc88a648ef289f5fe708 |
|
BLAKE2b-256 | 7a22a11667f042d68a601611db12049232b0f78bd4f1fee51705e7d0a86eb6d5 |
Close
Hashes for project_utils_django-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0d2c890b7884ccc3b9acc6622068584aa391de06eaa7c1a768a3e26fe50506c |
|
MD5 | ea2cc0668ed17d3819504879bf444703 |
|
BLAKE2b-256 | bfa2c9b920fe7c6fac83cc9b8a9f3b4866d43d840b14d1a1af3101f948c8fec1 |