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.6.tar.gz
(45.2 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-config-1.2.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a405d900febffdbb64b6acac525130d7c7ba005b6de47a3964c0f0089d154f4 |
|
MD5 | b1e3e9fabcd817add4efd78a7f9573e7 |
|
BLAKE2b-256 | c9d8086e92d64d3f0c11f8a5ac2de95b8dab34dccdc70646e21b742aa067685e |
Close
Hashes for project_utils_config-1.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f40955528210688251f65c44f7cb4192c34ebc582479f5eb7aac0d73203e6e65 |
|
MD5 | 48add7af6798976a75e039cf8e39bc27 |
|
BLAKE2b-256 | 0d904ab31e01c50d32107a1a41ceacf548204254d567fbcd46a85006ed77d5ef |