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.10.tar.gz
(28.6 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-2023-0.3.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bf4d077c75d42342e0b1254d0ad9ea928faf058e0ce1bcb858f01383924cbb9 |
|
MD5 | b574bf2cd11985008b5d8bd0e92480b8 |
|
BLAKE2b-256 | 4af4e9a094bf440f431d951f4fda15e2c556f43345325831dc8d8b233241c000 |
Close
Hashes for project_utils_2023-0.3.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0039ca26402850b6ea481d38ddd1ea59c12aea951137a957854cfe59edca2c1f |
|
MD5 | a901365f2843c7b21502953916546b61 |
|
BLAKE2b-256 | 5929da234007f56265594f8f5b4b7af69eb95c8a621ce6cc949eb10f40fca3f9 |