nmp-notes 📝
nmp-notes (imported as nmp) is a lightweight Python library and CLI tool that drops a college practical's full code into your current folder.
📦 Installation
pip install nmp-notes
Or from source:
git clone https://github.com/Sus69/nmp-notes.git
cd nmp-notes
pip install -e .
🚀 CLI Usage
1. Interactive menu (default)
nmp
Shows an arrow-key menu (up/down + Enter, type-to-filter, q to quit). Pick one and its .py file is created in the current folder. Falls back to a numbered prompt when piped.
2. List practicals
nmp list
3. Create directly
nmp create 1a-bfs
nmp create 3-decision-tree -o my_tree.py
Generated files land in the current folder and are never overwritten silently — you'll be asked first (create prompts; the Python API needs force=True).
Practical 1a/1b/2a/2b also copy a shared RMP.py helper next to the file (never overwritten).
🐍 Python API Usage
import nmp
from nmp.mk import TemplateNotFoundError, TargetFileExistsError
print(nmp.mk.available_templates()) # ['10-tensorflow-demo', '1a-bfs', ...]
nmp.mk.file("1a-bfs") # ./bfs.py (+ ./RMP.py)
nmp.mk.file("3-decision-tree", filename="t.py") # custom name
nmp.mk.file("5-svm", output_dir="./labs") # custom dir
nmp.mk.file("5-svm", force=True) # overwrite
➕ Adding New Templates
- Drop the file in
src/nmp/templates/(e.g.kmeans.py). - Register it in
src/nmp/mk.py→PRACTICALS(slug → title + filename). - If it needs a shared helper, add it to
EXTRA_FILES. - Reinstall.
📄 License
MIT — see the LICENSE file for details.
Metadata
Release files for nmp-notes 0.2.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 | |
|---|---|---|---|
| nmp_notes-0.2.0.tar.gz | 13.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nmp_notes-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.7 kB
Release files / nmp_notes-0.2.0.tar.gz
| Download URL | nmp_notes-0.2.0.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b6e8b689da9df1e1804b50f6bbdbca63f49364e5bd1625c2c28d3c31e092acc
|
|
BLAKE2b-256 checksum How to use checksums |
f73b438458f078556d87b25190e6dfc05269afa88bf68260bb8c314a50f3094f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / nmp_notes-0.2.0-py3-none-any.whl
| Download URL | nmp_notes-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b92c5fcbb6739ad000a0e15243e64cd64febab46765760b97d27d627beb22544
|
|
BLAKE2b-256 checksum How to use checksums |
7efbeb1c1eebb7a518b363137a4f989465ebcbe45f760706867f569b625465ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|