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比热容

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.2.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.2.0
File Size Uploaded Provenance Actions
nbphy-0.2.0.tar.gz 3.3 kB Without provenance Details for nbphy-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nbphy 0.2.0
File Interpreter ABI Platform Actions
nbphy-0.2.0-py3-none-any.whl Python 3 none any Details for nbphy-0.2.0-py3-none-any.whl

Total release size: 7.1 kB

Release files / nbphy-0.2.0.tar.gz

Download URL nbphy-0.2.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1842685000d3c901aff4fb3c2e156f4c5cf5fc4ca3b5e9f5b300f3f42813ced7
BLAKE2b-256 checksum
How to use checksums
15567581a354fb9e4e13d8a2b68f685f71ece6c0df2b43ed7f97d3e551d8693e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / nbphy-0.2.0-py3-none-any.whl

Download URL nbphy-0.2.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4d9863c7bdb54d02346d8ae3714e352614976824763da84bfc3461bdf28c067
BLAKE2b-256 checksum
How to use checksums
5d93bf5934132d34dc8aaa90cc81bd49baf9a867e83d5278c4274360445b8463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for nbphy 0.2.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