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.0.tar.gz
(29.7 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-config-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3265cd76829067c9696f7cc2b6575218abe562c9b1e88317ac76ee6cc630fb00 |
|
MD5 | b006a961273d24ada4481463aed232a1 |
|
BLAKE2b-256 | a3dfa8810e5701bd58aa0e4cb7026d7c01b2e2ef98563a58e65f41b779970ac1 |
Close
Hashes for project_utils_config-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb39bb6c4191998b871fc6cb9b42e200d692ca0d635ef909ee9ac6753e3ed9d8 |
|
MD5 | 143a599c72e99cd4107e1d0fbb515f10 |
|
BLAKE2b-256 | 88027d000525bf182272a7c0d53874e15e2b19ad47c190ffa456f255b855c11c |