Skip to main content

python project utils,version from 2.0.0

Project description

project-utils

介绍

project-utils 基于python3 的工具包

软件架构

使用时继承相应类即可

安装教程

pip3 install 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 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-config-2.0.0.tar.gz (52.6 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_config-2.0.0-py3-none-any.whl (128.2 kB view details)

Uploaded Python 3

File details

Details for the file project-utils-config-2.0.0.tar.gz.

File metadata

  • Download URL: project-utils-config-2.0.0.tar.gz
  • Upload date:
  • Size: 52.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.19

File hashes

Hashes for project-utils-config-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8c73a216617471cb1b4142903f625d0c192ebf709c3288bf09d48dc20f565f04
MD5 3e8b007e9fa5e297c0effdeca46fa632
BLAKE2b-256 9aefd6ecd6b76834d4568199c3884124d5504f4f987d5793205d7c3f303d2ab8

See more details on using hashes here.

File details

Details for the file project_utils_config-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for project_utils_config-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38874504dc6948093c1cfd7318c98a0db9d70ae9cfa7cb86c782146df089adee
MD5 50faa3929a3cfe8fd45e5c2da6cf3599
BLAKE2b-256 765c6fce7ec3cbc46b93c48f71b7a1390f4079b37cfea838a5818fcff8582f07

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