Skip to main content

npworks-content — NPworks 教材内容

PyPI Python License: MIT

计算物理交互式教材的内容包,包含 7 章 27 节 Python 物理计算示例代码及 YAML 元数据。

通常无需单独安装此包,请安装元包 pip install npworks。

教材章节

章 节数 内容
第1章 Python 基础 5 Hello World, 变量, 控制流, 函数, 文件读写
第2章 数值计算 6 NumPy, 梯形积分, 辛普森积分, 欧拉法, RK4, Matplotlib
第3章 经典力学 5 抛体运动, 行星轨道, 简谐振子, 阻尼振子, 双摆
第4章 电磁学 2 电场, 磁场
第5章 热力学与统计物理 3 随机行走, 分子动力学, 热传导
第6章 量子力学 3 波函数, 薛定谔方程, 量子隧穿
第7章 波动与光学 3 波动方程, 干涉, 衍射

独立安装

pip install npworks-content

公共接口

import npworks_content

npworks_content.get_chapters()                              # → list[dict]
npworks_content.get_section_code(chapter_id, filename)      # → str
npworks_content.get_section_path(chapter_id, filename)      # → Path
npworks_content.get_version()                                # → str

内容格式

每章一个目录,包含 meta.yaml 和 Python 脚本:

title: "第1章 Python 基础"
description: "Python 编程语言基础入门"
sections:
  - file: "01_hello.py"
    title: "1.1 Hello World"
  - file: "02_variables.py"
    title: "1.2 变量与数据类型"

链接

License

MIT

Release files for npworks-content 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for npworks-content 0.0.2
File Size Uploaded
npworks_content-0.0.2.tar.gz 25.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for npworks-content 0.0.2
File Interpreter ABI Platform
npworks_content-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 66.3 kB

Release files / npworks_content-0.0.2.tar.gz

Download URL npworks_content-0.0.2.tar.gz
Size 25.9 kB
Tags Source
SHA-256 checksum
How to use checksums
759a254e56bce3b141df919ba5a0b773f3b086da071f97a8767298e189554092
BLAKE2b-256 checksum
How to use checksums
87c7bbc600db8e84f21a07538276e38287d408fc5ce6707f4f81f0bacd465b77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.8

Release files / npworks_content-0.0.2-py3-none-any.whl

Download URL npworks_content-0.0.2-py3-none-any.whl
Size 40.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f858522dcb052b4e62131b26d32a5e7599870e78259505a39c63cd270b89875
BLAKE2b-256 checksum
How to use checksums
edeb3a06ff043562f9f374a2f677efe900b8c0786f69abc39b904321fcf9178d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

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