Git Product home page Git Product logo

python_load_common_module's Introduction

Python不同项目加载公共模块

解决的问题

主要解决:Python中多个项目依赖公共项目的模块,引入公共模块的麻烦。

示例

backend和cms依赖于公共项目common,需要对backend和cms的util.load_common进行修改

  • COMMON_PROJECT_PATH - 公共项目的绝对路径
  • dependent_modules - 公共模块的依赖模块
  • common_modules - 公共模块

然后backend和cms就可以像引入本项目的模块一样引入公共模块的项目了(使用 from package import module而不是import package.module)

python_load_common_module's People

Contributors

xiaolisong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.