Skip to main content

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

  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 Distribution

pubmed_paper_fetcher_supri267-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

pubmed_paper_fetcher_supri267-0.1.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file pubmed_paper_fetcher_supri267-0.1.1.tar.gz.

File metadata

File hashes

Hashes for pubmed_paper_fetcher_supri267-0.1.1.tar.gz
Algorithm Hash digest
SHA256 74f33a82f8fdcb188ee0c7bd7b5fa48f8331de18ce30327703267d62e760be46
MD5 e94a857065840fe72f9cacafab0f4516
BLAKE2b-256 04d4a9175aed9552707bbd3e67647d552e2352c57b95ab931419ef7314841cb8

See more details on using hashes here.

File details

Details for the file pubmed_paper_fetcher_supri267-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pubmed_paper_fetcher_supri267-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbdf240f54aab41371e91dded0f8c7dea0e83792c11c8769489c20028dbdc890
MD5 1f9ca3e06046ba1f36291da86f17dfc4
BLAKE2b-256 8572fa08e86aa316e4041c09ef4ff43c41438492ad5c50bf30cc015c9ed89fc8

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