简体   繁体   English

simple-salesforce 和 simple_salesforce 有什么区别?

[英]What is the difference between simple-salesforce and simple_salesforce?

https://pypi.org/project/simple-salesforce/ https://pypi.org/project/simple-salesforce/

https://github.com/simple-salesforce/simple-salesforce https://github.com/simple-salesforce/simple-salesforce

The project is called simple-salesforce but the import is from simple_salesforce or I'm missing something?该项目名为simple-salesforce但导入来自simple_salesforce还是我遗漏了什么?

This means that i do pip install simple-salesforce and in my code I do import simple_salesforce ?这意味着我执行pip install simple-salesforce并且在我的代码中执行 import simple_salesforce How does it work?它是如何工作的? How python knows to do the link between simple-salesforce to simple_salesforce ? python 如何知道在simple-salesforcesimple_salesforce之间建立联系?

"simple-salesforce" is the name of the module, but since "-" character is an operator in python, they could not use it in variable name, and had to replace it with underscore. “simple-salesforce”是模块的名字,但是由于“-”字符是python中的一个操作符,他们不能在变量名中使用它,不得不用下划线代替它。

https://www.w3schools.com/python/python_variables.asp https://www.w3schools.com/python/python_variables.asp

The package name for pip is simple-salesforce . pip 的包名称simple-salesforce The module installed is called simple_salesforce (do note that the other spelling would be invalid for python because of the - ).安装该模块被称为simple_salesforce (做笔记,其他的拼写将是无效的,因为的蟒蛇- Python doesn't know the link, pip does. Python 不知道链接,pip 知道。 Python only looks for a module called simple_salesforce in the configured search locations and imports it, the pip package name is completely irrelevant to python itself (eg, see package opencv-python that installs module cv2 ) Python 只在配置的搜索位置查找一个名为simple_salesforce的模块并导入它,pip 包名称与 python 本身完全无关(例如,请参阅安装模块cv2opencv-python

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM