Skip to main content

Download all NCERT textbooks (Classes 1-12) in PDF format from the official NCERT website

Project description

๐Ÿ“š NCERT Book Downloader

Python 3.9+ License: MIT Code style: ruff

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 pypdf dependency

๐Ÿ› ๏ธ 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

๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncert_book_downloader-1.0.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ncert_book_downloader-1.0.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

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

Hashes for ncert_book_downloader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c11385dde83e56b4e6d03e48da435498ba975e193d00cee763478477c4682cc5
MD5 ca6e6d83bfd33c6dfc3dbb520dfb694b
BLAKE2b-256 ddf3d955644aef26c55441a5616df2ad7ca237229970d01faf29bf42c56ce7f3

See more details on using hashes here.

File details

Details for the file ncert_book_downloader-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ncert_book_downloader-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80f062ebebdcccaf8c0b2a8bb3d849d31680688aa4fe9096238c92c610c113a1
MD5 75380f64706e7a51eaaf41332d24b6b9
BLAKE2b-256 3f9cf6b35dc75e4334bfdca02d038894806c76b63a377b4f5be569444afd3c9f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page