Skip to main content

Fetch and filter PubMed papers based on pharmaceutical/biotech affiliations.

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

  1. To fetch papers and display them on console:
$ poetry run get-papers-list "COVID-19 vaccine"
  1. To save results to a CSV file:
$ poetry run get-papers-list "COVID-19 vaccine" -f results.csv
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pubmed_paper_fetcher-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file pubmed_paper_fetcher-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pubmed_paper_fetcher-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e66439533702ee09f0593b985d931ecd242516776ed30bbe3a129867ce59e2c
MD5 9726b73e6dcbe28c38fe968aa63dd535
BLAKE2b-256 9742223d607bbd739ff49bf56c11a9a123ce3b853f29fd1279e5e2e24ad75399

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page