Metadata-Version: 2.5
Name: np2
Version: 1.2.0
Summary: Offline IMAP revision: commands with use cases and unit-wise definitions
Author: Kanishk Thakar
Keywords: django,docker,imap,revision,study
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# NP2 — IMAP theory, commands and solved practice

```sh
pip install --upgrade np2
```

```python
import np2
np2.show()       # short menu
np2.show1()      # commands, use cases, general SQL and exact exercise commands
np2.show2()      # all five units: theory, practice answers and general patterns
np2.show2(1)     # one unit: choose 1, 2, 3, 4 or 5
```

`import NP2; NP2.show2()` also works. Use the spelling you imported; show/SHOW,
show2/SHOW2 and search text/tool names work without case-sensitive matching.
`np2.show(1)` and `np2.show(2, 1)` remain compatible with older releases.

## What is in show2?

Every unit contains definitions, answers to that unit's supplied practice
questions, reusable fill-in-the-blank patterns, and the complete original chapter
text with explanations/programs/comparisons/revision sections. There are:

- **73 practice question groups**, preserving original prompts and answering every
  subpart: Unit 1 (10), Unit 2 (15), Unit 3 (20), Unit 4 (12), Unit 5 (15 theory
  questions plus its Docker-command group).
- **104 general fill-in-the-blank patterns** across all five units, each with an
  answer and explanation; these teach the pattern beyond a memorized blank key.
- **113 conforming named HTML elements** with meanings/examples, plus attributes,
  all standard input types, semantic comparisons, void elements and legacy tags.
  The tag inventory was compared with WHATWG's current index on 9 November 2026.
- **75 general SQL patterns** covering schema/data/query/access/transaction
  operations, joins, subqueries, CTEs, windows, indexes, views and further cases.
  A portability guide distinguishes PostgreSQL, MySQL, SQLite, SQL Server and
  some Oracle variants. No single SQL string is claimed to run on every engine.
- All **15 exact SQL exercise answers**, **15 MongoDB commands**, **15 Git
  commands**, **15 Docker commands**, and **9 supplied blank exercises** with
  ordered answers and completed examples. These are included in the 73 groups.
- The earlier **175 concise definitions** and all **108 unit subsections / 361
  extracted source pages** remain included.

| Unit | Topic | Main-source PDF pages | New practice content |
|---|---|---|---|
| 1 | HTML, CSS, JS, Git | 18–90 | Theory, 15 Git cases, HTML blanks, CSS solutions, full tag reference |
| 2 | Python, Django, DRF | 91–166 | Theory/programs, auth/ORM, Django blanks and corrections |
| 3 | Databases/cloud | 167–229 | Theory, 15 SQL and 15 MongoDB cases, general SQL/dialect guide |
| 4 | React | 230–309 | Theory, Hooks/context/reducers, completed blank programs |
| 5 | Docker/deployment | 310–378 | Theory, deployment workflow, 15 Docker cases |

## Useful optional filters

```python
np2.show1("sql")                # SQL commands with use cases
np2.practice(3, 10)              # exact SQL exercise + answers
np2.practice(2, 13)              # booking blanks and code corrections
np2.blanks(4)                   # general React fill-in patterns
np2.html()                      # HTML reference only
np2.sql()                       # general SQL plus exact SQL exercise
np2.search("colspan")           # search every content section
np2.show2(3, pager=True)         # terminal pager for long content; q quits
```

The package prints reference examples; it **never executes them**. Tools/servers
are not installed by NP2. SQL snippets are independent patterns unless described
as a sequence; supply their prerequisite schema and check the dialect. Original
practice prompts are retained even when their sample code is incomplete. Answers
explicitly distinguish the blank key from additional corrections (for example,
the Booking model needs confirmed and booking creation must supply guest).

## Scope and sources

Based on the user-provided `IMAP_Exam_Bible.pdf` and `IMAP Practice Questions.pdf`.
The full practice text is bundled as reference data, not operational instructions.
All 73 top-level question groups are mapped to answers. Main-unit text includes
every extracted page from Units 1–5. This is coverage of these files, not all
possible future exam questions, every SQL dialect/option, or every historical
vendor-specific HTML experiment. Foreign SVG/MathML vocabularies and unbounded
custom-element names are distinguished from HTML's named elements.

PDF extraction can flatten tables, code indentation and diagram layout; use the
original PDFs for exact visual formatting. Main-source exam forecasts/historical
claims are not independently verified. General blank drills and worked answers
are new teaching material; they are not additional official exam questions.

Official references checked for this update:
- https://html.spec.whatwg.org/multipage/indices.html#elements-3
- https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements
- https://www.postgresql.org/docs/current/sql.html
- https://www.postgresql.org/docs/current/sql-createtable.html
- https://www.postgresql.org/docs/current/tutorial-transactions.html
- https://dev.mysql.com/doc/refman/8.4/en/example-auto-increment.html
- https://www.sqlite.org/lang.html
- https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql-identity-property

All 15 exact SQL solutions were executed in an isolated PostgreSQL 17 test
cluster, including checks for foreign keys, empty names, empty-parent aggregates
and the balance/city filter. This validates those PostgreSQL examples, not every
DBMS variant. General PostgreSQL examples receive syntax parsing separately.

Python 3.9+, no runtime dependencies, offline after installation. Public
publication was requested by the user. No separate open-source license is
assigned to the source books and no credentials are bundled. Build using
`python -m pip install build` then `python -m build`.
