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.9.tar.gz
(31.5 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-config-1.1.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6808f813557d3839267c497e03300e4faf2fd2ad80e2a437b4696258a5e2e0d |
|
MD5 | 00225b2d3f126411cdc8b23750814125 |
|
BLAKE2b-256 | 9069f8bdc2b81513faee17f4227a58fd1f2eb3de22edd90709ce48cf93b685c8 |
Close
Hashes for project_utils_config-1.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e67f70d9bfebf4c35bf2b3989501c1bb22a1625cd5734beae4882b3397f6ae5 |
|
MD5 | 6b8411d46e026f1236c84bc679f055fd |
|
BLAKE2b-256 | 7cdf5010796a3dea89745b022e929f338eabaa87b49b346a87ee36c3ba80a934 |