A Python client for interacting with the PubMed Search API to retrieve and manage biomedical literature. 📚
PubMed_search_api_python/
├── client.py # Core client implementation
├── main.py # Main application entry point
├── pubmed_search.py # Search functionality and data handling
├── README.md # This documentation file
└── requirements.txt # Project dependencies
Make sure you have installed the following dependencies:
biopython🧬fastapi⚡uvicorn🦄requests🌐
You can install these dependencies using:
pip install biopython fastapi uvicorn requests- Clone the repository
https://github.com/JackKuo666/PubMed-Search-API-Python.git- Install dependencies:
pip install -r requirements.txtThe pubmed_search.py file contains the search_database function for searching articles and retrieving abstracts from the PubMed database.
The client.py file includes the test_client function for testing the search functionality of the FastAPI service.
The main.py file defines the basic routes for the FastAPI application.
Run the following command in the terminal to start the FastAPI service:
uvicorn main:app --reloadThis will start a local server at http://127.0.0.1:8001 by default.
In client.py, the test_client function is used to test the search functionality. You can modify the term, db, and retmax parameters as needed.
Run the client.py file:
python client.pyContributions to this project are welcome! If you find any issues or have suggestions for improvements, please submit an Issue or Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.