Skip to main content

nmp-notes 📝

PyPI version Python versions License: MIT

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/kc9ru/samajseva.git
cd samajseva
pip install -e .

🚀 CLI Usage

1. Interactive menu (default)

nmp

Shows a numbered list grouped by subject; enter a number, a full name (ai.1a-bfs), a bare slug (1a-bfs), or a partial name (bfs) to create that practical's .py in the current folder. q quits. No raw mode or ANSI, so it works in any terminal (Windows, dumb, SSH, piped).

2. List practicals

nmp list

3. Create directly

nmp create ai.1a-bfs
nmp create cis.1-ciphers
nmp create 3-decision-tree -o my_tree.py

Generated files are named practical1.py, practical2.py, … in the current folder — the number continues from the highest existing practicalN.py, so nothing is ever overwritten. Use -o for a custom name.

AI practicals 1a/1b/2a/2b also copy a shared RMP.py helper next to the file (never overwritten).


📚 Subjects

Subject Code Practicals
Artificial Intelligence ai 12 (1a–10)
Cyber and Information Security cis 10

Templates live in src/nmp/templates/<subject>/. CIS practicals 2 and 4 need pip install rsa; practical 6 needs cryptography; practical 7 needs internet access.


🐍 Python API Usage

import nmp
from nmp.mk import TemplateNotFoundError, TargetFileExistsError

print(nmp.mk.available_templates())  # ['ai.1a-bfs', ..., 'cis.1-ciphers', ...]

nmp.mk.file("ai.1a-bfs")                          # ./practical1.py (+ ./RMP.py)
nmp.mk.file("cis.1-ciphers")                      # ./practical2.py
nmp.mk.file("3-decision-tree", filename="t.py")   # bare slug + custom name
nmp.mk.file("5-svm", output_dir="./labs")         # ./labs/practical1.py
nmp.mk.file("5-svm", force=True)                  # overwrite

➕ Adding New Practicals

  1. Drop the file in the subject folder, e.g. src/nmp/templates/ai/kmeans.py.
  2. Register it in src/nmp/mk.py → PRACTICALS["ai"] ("kmeans": ("P11 - K-Means", "kmeans.py")).
  3. If it needs a shared helper, add it to EXTRA_FILES under ("ai", "kmeans").
  4. Reinstall.

➕ Adding A New Subject

  1. Create src/nmp/templates/<code>/ and add your .py files.
  2. Add the label to SUBJECTS and the practicals to PRACTICALS in src/nmp/mk.py.
  3. Reinstall. nmp list groups it automatically; nmp create <code>.<slug> works immediately.

📄 License

MIT — see the LICENSE file for details.

Metadata

Release files for nmp-notes 0.2.1

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

Source distribution (sdist)

Source distribution for nmp-notes 0.2.1
File Size Uploaded Provenance Actions
nmp_notes-0.2.1.tar.gz 17.7 kB With provenance Details for nmp_notes-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nmp-notes 0.2.1
File Interpreter ABI Platform Actions
nmp_notes-0.2.1-py3-none-any.whl Python 3 none any Details for nmp_notes-0.2.1-py3-none-any.whl

Total release size: 40.6 kB

Release files / nmp_notes-0.2.1.tar.gz

Download URL nmp_notes-0.2.1.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7d1ad10be666fceb44b4f60775f1848d4ff628e29971a09af10c6adfd2ba38e4
BLAKE2b-256 checksum
How to use checksums
849435bb0b8b191ee3ab0c444416d83fdadb30ba672fe6d8ec5f189a9c2fd4a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / nmp_notes-0.2.1-py3-none-any.whl

Download URL nmp_notes-0.2.1-py3-none-any.whl
Size 22.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b73dfb1c3e5cf2acc07089e5c80540b7ce9c877a215bcb0707274f9c51addfd0
BLAKE2b-256 checksum
How to use checksums
bc2cc93d1f31e63a38aacc81743a4fb62ece16db25812f08e34753c9a1c318ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for nmp-notes 0.2.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nmp_notes-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files Full provenance

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