Skip to main content

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)

Source distribution for nbphy 0.3.0
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)

Table of built distributions (wheels) for nbphy 0.3.0
File Interpreter ABI Platform Actions
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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page