nbphy
python基础物理库,可以做一些基础的物理计算
安装
pip install nbphy
快速开始
import nbphy
F = nbphy.force(100, "N") #力100N
s = nbphy.displacement(5, "m") #距离5m
W = F*s #500
print(W)
模块介绍
core核心模块
displacement距离force力work功time时间lever杠杆velocity速度density密度pressure压强tabular表格绘制函数heat热量specific_heat_capacity比热容resuster电阻voltage电压current电流
nbphy.const常量模块
g重力加速度c光速pi圆周率density_of_water水的密度specific_heat_capacity_of_water水的比热容
示例代码
import nbphy
field = ["钩码质量(g)", "弹簧测力计示数(N)"]
row = [
[50, 0.5],
[100, 1],
[150, 1.5],
[200, 2]
]
print(nbphy.tabular(field, row))
data = [3.40, 3.45, 3.47]
print(nbphy.average(data))
许可证
MIT
Metadata
Release files for nbphy 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nbphy-0.3.0.tar.gz | 3.5 kB | Without provenance | Details for nbphy-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nbphy-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for nbphy-0.3.0-py3-none-any.whl |
Total release size: 7.4 kB
Release files / nbphy-0.3.0.tar.gz
| Download URL | nbphy-0.3.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e72b046eafa153a9d076aaee75d676f7b940eec6a083b6e2b64a991f26ebb586
|
|
BLAKE2b-256 checksum How to use checksums |
edf86c9244373cf932a25c3cf365515dc854fd2a6647bb0f5a291589b7260cfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Release files / nbphy-0.3.0-py3-none-any.whl
| Download URL | nbphy-0.3.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
823ac7b5969a13fd3743653799fbddaba9d051f7269b7ea56f596ef8b089525e
|
|
BLAKE2b-256 checksum How to use checksums |
6f0b65a6b8e9338d5159e651ad2325fdfefba04a477e8ffe7061ede6d1b267c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Security for nbphy 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.