dooma 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dooma-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dooma Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
dooma-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,86 @@
1
+ Metadata-Version: 2.4
2
+ Name: dooma
3
+ Version: 0.1.0
4
+ Summary: A blazing-fast, interactive terminal explorer for 17,000+ company-wise DSA interview questions.
5
+ Author: dooma-dev
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/im-anishraj/dooma
8
+ Project-URL: Repository, https://github.com/im-anishraj/dooma.git
9
+ Project-URL: Bug Tracker, https://github.com/im-anishraj/dooma/issues
10
+ Keywords: dsa,interview,leetcode,terminal,cli,algorithms
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Education
23
+ Classifier: Topic :: Software Development :: User Interfaces
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: typer>=0.9.0
28
+ Requires-Dist: rich>=13.0.0
29
+ Requires-Dist: pydantic>=2.0.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: black>=23.0.0; extra == "dev"
32
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
33
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
34
+ Dynamic: license-file
35
+
36
+ # Dooma
37
+
38
+ ![Dooma Logo](https://img.shields.io/badge/Dooma-DSA_Forge-blue?style=for-the-badge)
39
+ [![Python Version](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/downloads/)
40
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
41
+ [![CI Build](https://img.shields.io/github/actions/workflow/status/im-anishraj/dooma/ci.yml?branch=main)](https://github.com/im-anishraj/dooma/actions)
42
+
43
+ **Dooma** is your ultimate, blazing-fast Data Structures and Algorithms (DSA) preparation companion. Built entirely for the terminal, it serves as a lightweight, interactive explorer for over **17,900+ real interview questions** from **660+ top tech companies**.
44
+
45
+ No more scrolling through clunky websites or losing track of which questions Amazon or Google actually ask. Dooma brings the entire dataset straight into your console with a beautiful, responsive UI.
46
+
47
+ ## 🚀 Features
48
+
49
+ - **Massive Database**: Access a curated, offline-first dataset of 17,931 question mappings across 662 companies.
50
+ - **Interactive Terminal UI**: Built with `Rich` and `Typer`, Dooma offers a stunning, paginated, and easy-to-navigate interface.
51
+ - **Alphabetical Explorer**: Quickly jump to your target company (e.g., press `G` for Google) and view all associated questions.
52
+ - **Data Rich**: Instantly see Question Titles, Difficulty Ratings (color-coded), Frequency/Acceptance percentages, and direct LeetCode URLs.
53
+ - **Zero Overhead**: No accounts, no internet required to browse the database, no tracking. Just pure preparation.
54
+
55
+ ## 📦 Quickstart
56
+
57
+ Dooma is incredibly easy to set up and use.
58
+
59
+ ### Installation
60
+ Clone the repository and install it locally using `pip`:
61
+ ```bash
62
+ git clone https://github.com/im-anishraj/dooma.git
63
+ cd dooma
64
+ pip install -e .
65
+ ```
66
+
67
+ ### Usage
68
+ Once installed, simply run the tool from anywhere in your terminal:
69
+ ```bash
70
+ dooma
71
+ ```
72
+ 1. You will be greeted by an alphabet menu. Type the first letter of your target company (e.g., `A` for Amazon).
73
+ 2. Select your company from the beautifully paginated list.
74
+ 3. Browse the questions, take note of the difficulties and frequencies, and click the URLs to practice!
75
+ 4. Type `0` at any time to safely step back through the menus.
76
+
77
+ ## 🤝 Contributing
78
+
79
+ We welcome contributions to make Dooma even better! Whether you want to update the dataset, add new features, or improve the UI, we'd love your help.
80
+ Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to get started and the pull request process.
81
+
82
+ Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
83
+
84
+ ## 📜 License
85
+
86
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
dooma-0.1.0/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # Dooma
2
+
3
+ ![Dooma Logo](https://img.shields.io/badge/Dooma-DSA_Forge-blue?style=for-the-badge)
4
+ [![Python Version](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/downloads/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![CI Build](https://img.shields.io/github/actions/workflow/status/im-anishraj/dooma/ci.yml?branch=main)](https://github.com/im-anishraj/dooma/actions)
7
+
8
+ **Dooma** is your ultimate, blazing-fast Data Structures and Algorithms (DSA) preparation companion. Built entirely for the terminal, it serves as a lightweight, interactive explorer for over **17,900+ real interview questions** from **660+ top tech companies**.
9
+
10
+ No more scrolling through clunky websites or losing track of which questions Amazon or Google actually ask. Dooma brings the entire dataset straight into your console with a beautiful, responsive UI.
11
+
12
+ ## 🚀 Features
13
+
14
+ - **Massive Database**: Access a curated, offline-first dataset of 17,931 question mappings across 662 companies.
15
+ - **Interactive Terminal UI**: Built with `Rich` and `Typer`, Dooma offers a stunning, paginated, and easy-to-navigate interface.
16
+ - **Alphabetical Explorer**: Quickly jump to your target company (e.g., press `G` for Google) and view all associated questions.
17
+ - **Data Rich**: Instantly see Question Titles, Difficulty Ratings (color-coded), Frequency/Acceptance percentages, and direct LeetCode URLs.
18
+ - **Zero Overhead**: No accounts, no internet required to browse the database, no tracking. Just pure preparation.
19
+
20
+ ## 📦 Quickstart
21
+
22
+ Dooma is incredibly easy to set up and use.
23
+
24
+ ### Installation
25
+ Clone the repository and install it locally using `pip`:
26
+ ```bash
27
+ git clone https://github.com/im-anishraj/dooma.git
28
+ cd dooma
29
+ pip install -e .
30
+ ```
31
+
32
+ ### Usage
33
+ Once installed, simply run the tool from anywhere in your terminal:
34
+ ```bash
35
+ dooma
36
+ ```
37
+ 1. You will be greeted by an alphabet menu. Type the first letter of your target company (e.g., `A` for Amazon).
38
+ 2. Select your company from the beautifully paginated list.
39
+ 3. Browse the questions, take note of the difficulties and frequencies, and click the URLs to practice!
40
+ 4. Type `0` at any time to safely step back through the menus.
41
+
42
+ ## 🤝 Contributing
43
+
44
+ We welcome contributions to make Dooma even better! Whether you want to update the dataset, add new features, or improve the UI, we'd love your help.
45
+ Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to get started and the pull request process.
46
+
47
+ Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
48
+
49
+ ## 📜 License
50
+
51
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
@@ -0,0 +1,5 @@
1
+ """
2
+ Dooma: A professional, open-source Python library and CLI for DSA practice.
3
+ """
4
+
5
+ __version__ = "0.1.0"
@@ -0,0 +1,3 @@
1
+ """
2
+ Typer CLI application for Dooma.
3
+ """
@@ -0,0 +1,182 @@
1
+ import json
2
+ from pathlib import Path
3
+
4
+ import typer
5
+ from rich.console import Console
6
+ from rich.table import Table
7
+ from rich.prompt import Prompt
8
+ from rich.panel import Panel
9
+ from rich.columns import Columns
10
+
11
+ app = typer.Typer(add_completion=False)
12
+ console = Console()
13
+
14
+ def load_data():
15
+ dataset_path = Path(__file__).parent.parent / "dataset" / "companies.json"
16
+ if not dataset_path.exists():
17
+ console.print(f"[red]Dataset not found at {dataset_path}![/red]")
18
+ raise typer.Exit(1)
19
+ with open(dataset_path, "r", encoding="utf-8") as f:
20
+ return json.load(f)
21
+
22
+ @app.callback(invoke_without_command=True)
23
+ def interactive_loop(ctx: typer.Context):
24
+ if ctx.invoked_subcommand is not None:
25
+ return
26
+
27
+ data = load_data()
28
+ companies = sorted(list(data.keys()))
29
+
30
+ # Group companies by first letter
31
+ groups = {}
32
+ for company in companies:
33
+ first_char = company[0].upper()
34
+ if not first_char.isalpha():
35
+ first_char = '#'
36
+
37
+ if first_char not in groups:
38
+ groups[first_char] = []
39
+ groups[first_char].append(company)
40
+
41
+ sorted_letters = sorted(list(groups.keys()))
42
+
43
+ while True:
44
+ console.clear()
45
+ console.print(Panel("[bold cyan]Welcome to Dooma - Your Ultimate DSA Preparation Companion[/bold cyan]"))
46
+ console.print("[bold magenta]--- Step 1: Select the First Letter of the Company You Want to Prepare For ---[/bold magenta]\n")
47
+
48
+ # Display letters nicely
49
+ letter_display = []
50
+ for letter in sorted_letters:
51
+ count = len(groups[letter])
52
+ letter_display.append(f"[bold yellow]{letter}[/bold yellow] [dim]({count})[/dim]")
53
+
54
+ console.print(Columns(letter_display, expand=True, equal=True))
55
+
56
+ console.print("\n[dim]Options:[/dim]")
57
+ console.print("[dim]- Type a letter to explore companies (e.g., 'A', 'G', '#')[/dim]")
58
+ console.print("[dim]- Enter '0' to safely exit the application[/dim]")
59
+
60
+ choice = Prompt.ask("\nYour choice", default="")
61
+ choice = choice.upper().strip()
62
+
63
+ if choice == "0":
64
+ console.print("[green]Goodbye![/green]")
65
+ raise typer.Exit()
66
+ elif choice in groups:
67
+ show_company_list(choice, groups[choice], data)
68
+ else:
69
+ console.print("[red]Invalid letter. Please select a letter from the list above.[/red]")
70
+ Prompt.ask("[dim]Press Enter to continue...[/dim]")
71
+
72
+ def show_company_list(letter, group_companies, data):
73
+ page = 0
74
+ items_per_page = 30
75
+
76
+ while True:
77
+ console.clear()
78
+ console.print(Panel(f"[bold cyan]Step 2: Choose Your Target Company (Starting with '{letter}')[/bold cyan]"))
79
+ console.print(f"[bold magenta]--- Page {page + 1} ---[/bold magenta]\n")
80
+
81
+ start_idx = page * items_per_page
82
+ end_idx = min(start_idx + items_per_page, len(group_companies))
83
+
84
+ for i in range(start_idx, end_idx):
85
+ console.print(f" [bold yellow]{i + 1}.[/bold yellow] {group_companies[i]}")
86
+
87
+ console.print("\n[dim]Options:[/dim]")
88
+ console.print("[dim]- Type the number next to the company name to view its questions[/dim]")
89
+ if end_idx < len(group_companies):
90
+ console.print("[dim]- Enter 'n' for the next page[/dim]")
91
+ if page > 0:
92
+ console.print("[dim]- Enter 'p' for the previous page[/dim]")
93
+ console.print("[dim]- Enter '0' to go one step back to the alphabet menu[/dim]")
94
+
95
+ choice = Prompt.ask("\nYour choice", default="")
96
+ choice = choice.strip()
97
+
98
+ if choice == "0":
99
+ return
100
+ elif choice.lower() == 'n' and end_idx < len(group_companies):
101
+ page += 1
102
+ elif choice.lower() == 'p' and page > 0:
103
+ page -= 1
104
+ elif choice.isdigit():
105
+ idx = int(choice) - 1
106
+ if 0 <= idx < len(group_companies):
107
+ company_name = group_companies[idx]
108
+ show_company_questions(company_name, data[company_name])
109
+ else:
110
+ console.print("[red]Invalid selection.[/red]")
111
+ Prompt.ask("[dim]Press Enter to continue...[/dim]")
112
+ else:
113
+ console.print("[red]Invalid input.[/red]")
114
+ Prompt.ask("[dim]Press Enter to continue...[/dim]")
115
+
116
+ def show_company_questions(company_name, questions):
117
+ page = 0
118
+ items_per_page = 15
119
+
120
+ while True:
121
+ console.clear()
122
+ table = Table(
123
+ title=f"Step 3: Interview Questions for [bold cyan]{company_name}[/bold cyan] (Page {page + 1})",
124
+ show_header=True,
125
+ header_style="bold magenta",
126
+ expand=True
127
+ )
128
+ table.add_column("No.", justify="right", style="cyan", no_wrap=True)
129
+ table.add_column("Title", style="white")
130
+ table.add_column("Difficulty", style="white")
131
+ table.add_column("Frequency", style="yellow")
132
+ table.add_column("URL", style="blue")
133
+
134
+ start_idx = page * items_per_page
135
+ end_idx = min(start_idx + items_per_page, len(questions))
136
+
137
+ for i in range(start_idx, end_idx):
138
+ q = questions[i]
139
+ diff = q.get("difficulty", "N/A")
140
+ if diff == "Easy":
141
+ diff_color = "green"
142
+ elif diff == "Medium":
143
+ diff_color = "yellow"
144
+ elif diff == "Hard":
145
+ diff_color = "red"
146
+ else:
147
+ diff_color = "white"
148
+
149
+ diff_formatted = f"[{diff_color}]{diff}[/{diff_color}]"
150
+
151
+ table.add_row(
152
+ str(i + 1),
153
+ q.get("title", "N/A"),
154
+ diff_formatted,
155
+ q.get("frequency", "N/A"),
156
+ q.get("url", "N/A")
157
+ )
158
+
159
+ console.print(table)
160
+
161
+ console.print("\n[dim]Options:[/dim]")
162
+ if end_idx < len(questions):
163
+ console.print("[dim]- Enter 'n' for the next page of questions[/dim]")
164
+ if page > 0:
165
+ console.print("[dim]- Enter 'p' for the previous page of questions[/dim]")
166
+ console.print("[dim]- Enter '0' to go one step back to the company list[/dim]")
167
+
168
+ choice = Prompt.ask("\nYour choice", default="")
169
+ choice = choice.strip()
170
+
171
+ if choice == "0":
172
+ return # Go back to company list
173
+ elif choice.lower() == 'n' and end_idx < len(questions):
174
+ page += 1
175
+ elif choice.lower() == 'p' and page > 0:
176
+ page -= 1
177
+ else:
178
+ console.print("[red]Invalid input.[/red]")
179
+ Prompt.ask("[dim]Press Enter to continue...[/dim]")
180
+
181
+ if __name__ == "__main__":
182
+ app()