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.12.tar.gz
(28.6 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-2023-0.3.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a64a9a87d1e6c78ad033efa19a4ff2d24292b79a9db9e8ef203a9fff8f1239a9 |
|
MD5 | 7786e928009ec84c12211f2499054899 |
|
BLAKE2b-256 | e611a8da26e3be59be6e68e3be9c0a0b4b13f87132cf9b939aa210b1e17c5a90 |
Close
Hashes for project_utils_2023-0.3.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56b33ca06caacc3af6255d046fc7a29eb87ca8ebd7d3f50bf48d5fd3299a2999 |
|
MD5 | da0813dbc4e7f288802c0fd060315e4d |
|
BLAKE2b-256 | fe1e8fbbc34f5008be2602c027e8390dba5a36adb221f1e4ba6c1c007bc80a4f |