Download all NCERT textbooks (Classes 1-12) in PDF format from the official NCERT website
Project description
๐ NCERT Book Downloader
A Python tool to download all NCERT textbooks (Classes 1-12) in PDF format from the official NCERT website. Books are available in both English and Hindi medium.
โจ Features
- ๐ฅ Download all NCERT books from Classes 1 to 12
- ๐ Both English and Hindi medium supported
- ๐ Organized folder structure by class and subject
- โก Parallel downloads for faster completion
- ๐ Resume support - skips already downloaded files
- ๐ฆ Automatic ZIP extraction to get PDF files
- ๐ PDF merging - combine chapters into single books (optional)
- ๐ฏ Flexible filtering by class, subject, or language
๐ Available Books
| Classes | Subjects |
|---|---|
| Class 11-12 | Physics, Chemistry, Maths, Biology, Accountancy, Business Studies, Economics, Geography, History, Political Science, Psychology, Sociology, Hindi, English |
| Class 9-10 | Science, Maths, Social Science, Hindi, English |
| Class 6-8 | Science, Maths, Social Science, Hindi, English |
| Class 3-5 | Maths, EVS (Environmental Studies), Hindi, English |
| Class 1-2 | Maths, Hindi, English |
Total: 180+ books covering all CBSE subjects!
๐ Quick Start
Installation
Using pip (Recommended)
pip install ncert-book-downloader
From Source
# Clone the repository
git clone https://github.com/dpandey/ncert-book-downloader.git
cd ncert-book-downloader
# Install the package
pip install .
# Or install in development mode
pip install -e ".[dev,merge]"
Basic Usage
# Download all books
ncert-download
# Or use Python directly
python -m ncert_downloader.cli
Command Examples
# Download specific classes
ncert-download --classes 10 12
# Download specific subjects
ncert-download --subjects Maths Science
# Download specific language
ncert-download --language English
# Download and merge chapters into single PDFs
ncert-download --merge
# Combine filters
ncert-download --classes 12 --subjects Physics --language English
# Custom output directory
ncert-download --output /path/to/save/books
# List available books
ncert-download --list
# Fast download with more parallel connections
ncert-download --workers 10
๐ Folder Structure
Downloads are organized as follows:
NCERT_Books/
โโโ Class_12/
โ โโโ Physics/
โ โ โโโ English/
โ โ โ โโโ (PDF files)
โ โ โโโ Hindi/
โ โ โโโ (PDF files)
โ โโโ Chemistry/
โ โโโ Maths/
โ โโโ ...
โโโ Class_11/
โโโ Class_10/
โโโ ...
โโโ Class_1/
โ๏ธ Command Line Options
| Option | Description |
|---|---|
-o, --output DIR |
Output directory (default: NCERT_Books) |
-c, --classes N [N ...] |
Download specific classes (1-12) |
-s, --subjects SUB [SUB ...] |
Download specific subjects |
-l, --language LANG |
Download specific language (English/Hindi) |
-w, --workers N |
Number of parallel downloads (default: 5) |
--no-extract |
Don't extract ZIP files after downloading |
--merge |
Merge chapters into single PDF books |
--list |
List all available books |
-q, --quiet |
Reduce output verbosity |
-v, --version |
Show version number |
-h, --help |
Show help message |
๐ Python API
You can also use the library programmatically:
from ncert_downloader import download_all_books, NCERT_BOOKS, Book
# Download all books
results = download_all_books()
# Download with filters
results = download_all_books(
classes=[10, 12],
subjects=["Physics", "Chemistry"],
languages=["English"],
max_workers=10
)
# Access book catalog
for book in NCERT_BOOKS:
print(f"{book.class_num}: {book.subject} - {book.title}")
๐ Notes
- Books are downloaded from the official NCERT website (ncert.nic.in)
- Files are downloaded as ZIP archives containing PDF chapters
- The tool automatically extracts PDFs after downloading
- Already downloaded files are skipped on re-run
- PDF merging requires the optional
pypdfdependency
๐ ๏ธ Development
# Clone and install in development mode
git clone https://github.com/dpandey/ncert-book-downloader.git
cd ncert-book-downloader
pip install -e ".[dev,merge]"
# Run linting
ruff check .
# Run tests
pytest
# Format code
ruff format .
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer: All NCERT books are copyrighted by NCERT and are provided free of charge for educational use. This tool simply facilitates downloading them from the official source.
๐ Credits
- Book PDFs served by NCERT Official Website
๐ค Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ncert_book_downloader-1.0.0.tar.gz.
File metadata
- Download URL: ncert_book_downloader-1.0.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c11385dde83e56b4e6d03e48da435498ba975e193d00cee763478477c4682cc5
|
|
| MD5 |
ca6e6d83bfd33c6dfc3dbb520dfb694b
|
|
| BLAKE2b-256 |
ddf3d955644aef26c55441a5616df2ad7ca237229970d01faf29bf42c56ce7f3
|
File details
Details for the file ncert_book_downloader-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ncert_book_downloader-1.0.0-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80f062ebebdcccaf8c0b2a8bb3d849d31680688aa4fe9096238c92c610c113a1
|
|
| MD5 |
75380f64706e7a51eaaf41332d24b6b9
|
|
| BLAKE2b-256 |
3f9cf6b35dc75e4334bfdca02d038894806c76b63a377b4f5be569444afd3c9f
|