Skip to main content

python project_utils tools

Project description

project-utils

介绍

project-utils 基于python3 的工具包

软件架构

使用时继承相应类即可

安装教程

pip3 install project-project_utils-2023

使用说明

  1. 安装以下格式创建工程
    • 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 =
        
    • 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-2023-0.3.19.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

project_utils_2023-0.3.19-py3-none-any.whl (56.0 kB view details)

Uploaded Python 3

File details

Details for the file project-utils-2023-0.3.19.tar.gz.

File metadata

  • Download URL: project-utils-2023-0.3.19.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for project-utils-2023-0.3.19.tar.gz
Algorithm Hash digest
SHA256 4f27d4065754702b50e75c6c3d6bf6f810a02920bb1afedac48b8de3202cd658
MD5 99e36f90ed3b8f901b9af6634ac2e1cd
BLAKE2b-256 a484ebadcf73c2f2c35722ac85042ef72d62d513c88d58dbabca23cdbf6797db

See more details on using hashes here.

File details

Details for the file project_utils_2023-0.3.19-py3-none-any.whl.

File metadata

File hashes

Hashes for project_utils_2023-0.3.19-py3-none-any.whl
Algorithm Hash digest
SHA256 75976c3c749112a4ed18b2cc89e9b651b516fef49ee2fb6ec728751b2b6ac248
MD5 3b6f61f631c92f5278cfaf36ec9ba918
BLAKE2b-256 f1184452f1671a50b6648fd355c427f7833e201b28c1630823bdb1298e4fa710

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page