A Python program to fetch research papers from PubMed with non-academic authors affiliated with pharmaceutical or biotech companies.
Project description
📚 PubMed Paper Fetcher - Python Package
A Python program to fetch research papers from PubMed based on a user-specified query. It identifies papers with at least one author affiliated with pharmaceutical or biotech companies and returns the results as a CSV file.
🌟 Features
- 🔍 Fetches papers from PubMed API using full query syntax.
- 📄 Outputs results as a CSV file with details:
- PubmedID: Unique identifier for the paper.
- Title: Title of the paper.
- Publication Date: Date of publication.
- Non-academic Authors: Authors affiliated with non-academic institutions.
- Company Affiliations: Names of pharmaceutical/biotech companies.
- Corresponding Author Email: Email of the corresponding author.
- 📦 Packaged with Poetry.
- 📤 Published on TestPyPI.
📁 Project Structure
📂 pubmed_paper_fetcher/
│
├── 📄 __init__.py (Makes it a package)
├── 📄 cli.py (Command-line interface logic)
├── 📄 fetcher.py (Module containing core functionalities)
⚙️ Installation
Clone the Repository
$ git clone https://github.com/YourUsername/pubmed-paper-fetcher-supri267.git
$ cd pubmed-paper-fetcher-supri267
Install Dependencies
Ensure you have Poetry installed. If not, install via:
$ pip install poetry
Install project dependencies:
$ poetry install
🚀 Usage
Command-Line Interface
- To fetch papers and display them on console:
$ poetry run get-papers-list "COVID-19 vaccine"
- To save results to a CSV file:
$ poetry run get-papers-list "COVID-19 vaccine" -f results.csv
- To enable debug mode for detailed logs:
$ poetry run get-papers-list "COVID-19 vaccine" -d
🔧 Testing the Module (TestPyPI)
Create a virtual environment:
$ python -m venv test-env
$ .\test-env\Scripts\activate (Windows)
$ source test-env/bin/activate (Linux/Mac)
Install the package:
$ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pubmed-paper-fetcher-supri267
Run the tool:
$ get-papers-list "Machine learning" -d
📚 Tools & Libraries Used
- Python (>=3.8)
- Requests (API interaction)
- Poetry (Dependency management & Packaging)
- Twine (Publishing to TestPyPI)
📌 Helpful Links
📢 Contact
For any issues or suggestions, feel free to reach out!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pubmed_paper_fetcher_supri267-0.1.1.tar.gz.
File metadata
- Download URL: pubmed_paper_fetcher_supri267-0.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74f33a82f8fdcb188ee0c7bd7b5fa48f8331de18ce30327703267d62e760be46
|
|
| MD5 |
e94a857065840fe72f9cacafab0f4516
|
|
| BLAKE2b-256 |
04d4a9175aed9552707bbd3e67647d552e2352c57b95ab931419ef7314841cb8
|
File details
Details for the file pubmed_paper_fetcher_supri267-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pubmed_paper_fetcher_supri267-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbdf240f54aab41371e91dded0f8c7dea0e83792c11c8769489c20028dbdc890
|
|
| MD5 |
1f9ca3e06046ba1f36291da86f17dfc4
|
|
| BLAKE2b-256 |
8572fa08e86aa316e4041c09ef4ff43c41438492ad5c50bf30cc015c9ed89fc8
|