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
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-django-1.0.3.tar.gz
(28.9 kB
view hashes)
Built Distribution
Close
Hashes for project-utils-django-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27a7660e58f8dfc4f28bc987a769f30524fcad51892c761e741ef006a9c7b4ea |
|
MD5 | f38c25281e0dc79e0a8d18be4f5853a7 |
|
BLAKE2b-256 | b9b553d919494b2bb8b4265b431973c1d299b1810e77334c628f4f5a1f4180e3 |
Close
Hashes for project_utils_django-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17180e2121ead42c2e26b9bc0c63f52890f6daf3f60012da658f5224e488b89d |
|
MD5 | 7a57d44239bb6b3f3891b14ab423a4ce |
|
BLAKE2b-256 | e593de07503d4022157b16d8a6247c8e32237be1aaaa0670723d86fb1e1c6ce1 |