{"id":30026366,"url":"https://github.com/gaurav-822/localdsa","last_synced_at":"2025-08-06T10:52:42.082Z","repository":{"id":308332238,"uuid":"1032479433","full_name":"Gaurav-822/LocalDSA","owner":"Gaurav-822","description":"A Python library for managing and solving coding problems locally.   It fetches similar problems from your local database, adds helpful comments after `question.id` and `question.name`, and lets you quickly test and store solutions without using external APIs.","archived":false,"fork":false,"pushed_at":"2025-08-05T11:53:56.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-05T11:54:29.179Z","etag":null,"topics":["python","sql","sqlite3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/local-dsa/0.1.0/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gaurav-822.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-05T11:15:24.000Z","updated_at":"2025-08-05T11:53:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"045d379f-6f42-4fc2-93a3-7dc83375a89b","html_url":"https://github.com/Gaurav-822/LocalDSA","commit_stats":null,"previous_names":["gaurav-822/localdsa"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Gaurav-822/LocalDSA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaurav-822%2FLocalDSA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaurav-822%2FLocalDSA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaurav-822%2FLocalDSA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaurav-822%2FLocalDSA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gaurav-822","download_url":"https://codeload.github.com/Gaurav-822/LocalDSA/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaurav-822%2FLocalDSA/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269067341,"owners_count":24354259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","sql","sqlite3"],"created_at":"2025-08-06T10:52:37.633Z","updated_at":"2025-08-06T10:52:42.061Z","avatar_url":"https://github.com/Gaurav-822.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local DSA\n\n**local_dsa** is a Python package designed to streamline coding problem-solving.  \nIt automatically fetches related problem suggestions from a local database,  \ninserts automated comments into your code, and allows you to run solution tests  \neasily just from a single .py file\n\n---\n\n## Features\n- **Global `question` object**  \n  Easily set and access:\n  ```python\n  from local_dsa import question\n\n  question.name = \"Sum of Two Numbers\"\n  question.id = 1\n  ```\n- **Automatic problem suggestions**  \n  Finds similar problems and inserts comments directly after your `question.name` line.\n- **Problem statement injection**  \n  Adds the problem statement after `question.id` line.\n- **Solution testing \u0026 storage**  \n  - `test_problem()` → runs test cases without storing code  \n  - `solve_problem()` → runs test cases and stores your solution in the database.\n\n---\n\n## Installation\nInstall using pip:\n```bash\npip install local-dsa\n```\n\n---\n\n## Quick Start\n\n### Example usage:\n```python\nfrom local_dsa import question, test_problem\n\n# Set question details\nquestion.name = \"Sum of Two Numbers\"\nquestion.id = 1\n\nclass SumTwoNumbers:\n    def solve(self, a, b):\n        return a + b\n\n# Test the solution\ntest_problem(question, SumTwoNumbers)\n```\n\n**Expected auto-comments in your file after saving \u0026 running:**\n```python\nquestion.name = \"Sum of Two Numbers\"\n## Problem found here: [ID: 1] Sum of Two Numbers\n\nquestion.id = 1\n## Attempting problem: Sum of Two Numbers\n## Given two integers, return their sum.\n```\n\n---\n\n## Command Overview\n- **`solve_problem(question, solver_class)`**  \n  Runs test cases and stores the function code.\n- **`test_problem(question, solver_class)`**  \n  Runs test cases without storing.\n\n---\n\n## Project Structure\n```\nlocal_dsa/\n├── __init__.py\n├── question.py\n├── main.py\n├── check_solutions.py\n├── code_storage.py\n```\n\n---\n\n## Contributing\nPull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaurav-822%2Flocaldsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaurav-822%2Flocaldsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaurav-822%2Flocaldsa/lists"}