ishaAtif/python-code-reviewer
0
1---2title: Python Code Reviewer3emoji: ๐4colorFrom: purple5colorTo: pink6sdk: docker7sdk_version: "3.10"8app_file: app.py9pinned: false10---11 12# ๐ Python Code Reviewer13 14An AI-powered Python code review tool that analyses your code across four dimensions.15 16171819 20## โจ Features21 22- ๐ **Bug Detection** โ Finds bugs, edge cases and risky patterns with line numbers23- โฑ๏ธ **Complexity Analysis** โ Time and space complexity with plain English explanation24- ๐๏ธ **OOP Suggestions** โ Design improvement recommendations25- โจ **Auto Rewrite** โ Clean, improved version of your code26 27## ๐ Live Demo28 29๐ [Try it on HuggingFace Spaces](https://huggingface.co/spaces/ishaAtif/python-code-reviewer)30 31## ๐ ๏ธ Tech Stack32 33| Tool | Purpose |34|---|---|35| Python | Core language |36| Streamlit | Web interface |37| Claude API (Haiku) | AI code review |38| python-dotenv | Environment variable management |39 40## โ๏ธ Run Locally41```bash42# Clone the repo43git clone https://github.com/isha-atif-dev/python-code-reviewer.git44cd python-code-reviewer45 46# Install dependencies47pip install -r requirements.txt48 49# Add your Claude API key50echo "ANTHROPIC_API_KEY=your_key_here" > .env51 52# Run the app53streamlit run app.py54```55 56## ๐ Project Structure57```58python-code-reviewer/59โโโ app.py # Streamlit frontend60โโโ reviewer.py # Claude API logic61โโโ prompts.py # Prompt templates62โโโ requirements.txt # Dependencies63โโโ Dockerfile # HuggingFace deployment64โโโ .gitignore # Ignores .env file65```66 67## ๐ Note68 69Never commit your `.env` file. Your API key is protected via `.gitignore`.