You are looking at the frontend, to see the backend repository, click here
A tiny open-source library engine powered by FastAPI and sentence_transformers.
The live version isn't up yet, but you can install and run it locally to explore how it works.
Once deployed, it'll be available at doespythonhaveit.com, and eventually, you'll also be able to use it directly from your terminal.
I built doespythonhaveit because I think it is nice to have a place where you can find libraries that fit your projects.
Like, you can type:
"machine learning time series"
and it'll (hopefully) find stuff like scikit-learn
or darts
.
- Search Python libraries using natural language
- Runs on FastAPI with Sentence Transformers
- Simple JSON dataset
- (TBA) Use it online
- (TBA) Search in your terminal
- Contributions are welcome (please I am very new here)
Contributions are super appreciated, I'm still learning how to do this whole open-source thing, so every bit of help means a lot 🙏
If you'd like to contribute (thank you so much!!), the main files to focus on are:
main.py
=> where the FastAPI magic happenslibraries.json
=> the dataset that powers the search
But honestly, if you spot something off anywhere else or have a cool idea, go for it! I'll probably love you forever
-
Fork this repository
-
Create a new branch for your feature or fix
git checkout -b your-cool-idea
-
Make your changes (and test them if possible)
-
Commit and push your work
git commit -m "feat: added something cool" git push origin feature/your-cool-idea
-
Open a Pull Request (PR), explain what you changed and why
-
I'll check it out, maybe test it, and if it is awesome, I will merge it!
*Prefix commit messages with feat:
, fix:
, docs:
, etc. (optional but cool)
If you want to run this locally since the website is not online, yet.
-
Clone both repositories:
# backend (API) git clone https://github.com/hasboi/doespythonhaveit.git cd dphi-api # frontend git clone https://github.com/hasboi/doespythonhaveit-web.git cd doespythonhaveit-web
You should now have two folders sitting side by side
-
Create virtual environment in your API folder and activate it:
python -m venv venv source venv/bin/activate # on Linux/Mac venv\Scripts\activate # on Windows # I often get confused about creating virtual environment but I hope this is the correct way
-
Install dependencies:
pip install -r requirements.txt
-
Run the server:
uvicorn main:app --reload
-
Then access it from
index.html
, You can use VS Code’s Live Server or Python’s local web server.You might also want to double-check the allowed origins in
main.py
, these define which URLs can talk to your API:origins = [ "http://localhost:5500", "http://127.0.0.1:5500", "http://127.0.0.1:5000", "http://localhost:3000", "https://doespythonhaveit.com", ]
If you're testing from a different port (like using a custom frontend), make sure to add your URL here, or the browser will hit you with that CORS policy.
Running this API online costs more than a free-tier server can handle, the model behind it, all-mpnet-base-v2, is kinda chunky and eats memory for breakfast.
If you find this project interesting, useful, or just want to help me keep it alive online someday, you can support me by becoming a sponsor!
Even small support helps, hosting and maintaining this API demo costs real money, and every contribution brings the public version closer to life.
Massive thanks to:
- FastAPI for letting my backend actually be fast
- Sentence Transformers for giving the search engine a brain
- Awesome Python for being the motherlode of library inspiration
- And every kind soul sponsoring, contributing, fixing typos, or just cheering from the sidelines 💙
This project is licensed under the MIT license, see LICENSE