A modern web application that empowers developers to search, explore, and understand Python libraries with ease. Libview provides intuitive access to library metadata, source code, and AI-powered assistance to streamline your development workflow.
- Comprehensive Search: Find any installed Python library or explore packages from PyPI
- Library Metadata: View version information, dependencies, descriptions, and more
- Code Explorer: Navigate library structure (classes, functions, methods) with ease
- Source Code Viewer: Examine implementation details with syntax highlighting
- Code Examples: Access practical usage examples for popular libraries
- Library Assistant: Get AI-powered recommendations and answers to your library-related questions
- Modern UI: Enjoy a clean, responsive interface with dark mode support
Libview/
├── backend/ # Flask backend
│ ├── app/ # Application code
│ │ ├── __init__.py # Flask app initialization
│ │ ├── api.py # API endpoints
│ │ └── assistant.py # Library Assistant functionality
│ ├── requirements.txt # Main dependencies
│ ├── requirements/ # Extra requirements
│ │ └── dev.txt # Development dependencies
│ └── run.py # Application entry point
└── frontend/ # React frontend
├── public/ # Static files
└── src/ # React source code
├── components/ # React components
├── services/ # API integration
└── types/ # TypeScript type definitions
- Python 3.8+
- Node.js 14+
- npm or yarn
- tmux (optional, for running both services simultaneously)
The easiest way to run the application is using the provided script:
chmod +x run.sh
./run.sh
This will start both the backend and frontend services in the current terminal. The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
cd backend
pip install -r requirements.txt
python run.py
The backend will run at http://localhost:5000
cd frontend
npm install
npm start
The frontend will run at http://localhost:3000
| Endpoint | Method | Description |
|---|---|---|
/api/search?q=<query> |
GET | Search for libraries |
/api/library/<library_name> |
GET | Get library information |
/api/library/<library_name>/source?type=<type>&name=<name>&parent=<parent> |
GET | Get source code |
/api/library/<library_name>/examples |
GET | Get code examples |
/api/assistant?query=<query> |
GET | Get AI-powered library recommendations |
/api/pypi/search?q=<query>&page=<page>&per_page=<per_page> |
GET | Search PyPI packages |
/api/pypi/package/<package_name> |
GET | Get PyPI package details |
-
Search for Libraries:
- Enter a Python library name in the search bar (e.g., "requests", "numpy", "flask")
- Or browse PyPI packages to discover new libraries
-
Explore Library Details:
- View library metadata, version information, and documentation links
- Browse the library's classes, functions, and constants
- Click on any component to see its documentation
-
View Source Code:
- Click "View Code" next to any component to see the implementation
- Use the syntax-highlighted code viewer to understand the implementation
-
Get AI Assistance:
- Use the Library Assistant with natural language queries like:
- "What's the best library for data visualization?"
- "I need a package for web scraping"
- "Help me find a good HTTP client"
- Use the Library Assistant with natural language queries like:
-
Backend:
- Flask: Web framework
- Python's inspect module: Library introspection
- AI-powered library recommendation system
-
Frontend:
- React: UI framework
- TypeScript: Type-safe JavaScript
- TailwindCSS: Styling
- Monaco Editor: Code viewer with syntax highlighting
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.