Skip to content

Drug Interaction Checker is a Python tool that uses PubChem's API to identify and analyze interactions between specified drugs. It fetches interaction data, processes it into CSV files, and highlights interactions directly in the terminal. Designed for medical professionals and researchers, the tool is simple, efficient, and customizable.

License

Notifications You must be signed in to change notification settings

agnivadas/Drug-Interaction-Checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Drug Interaction Checker

GPL License Image_Categorizer Maintenance Static Badge

Drug Interaction Finder is a Python-based tool for identifying drug interactions using PubChem's public APIs. This script fetches drug interaction data for specified drugs, saves the data in CSV format, and identifies interactions between the input drugs.

It is ideal for quick exploration of interactions between multiple drugs and can be utilized by medical professionals, researchers, and developers working on healthcare applications.

Main Limitation: Drug name normalization had to be done according PubChem data.

Features

  • Fetches drug interaction data from PubChem in CSV format.
  • Processes multiple drug names provided by the user.
  • Identifies interactions between the specified drugs.
  • Outputs interaction details directly in the terminal.
  • Handles API responses and malformed data gracefully.

Requirements

Ensure you have the following dependencies installed:

  • Python 3.7 or later
  • httpx Install dependencies with-
pip install httpx

How to Use

1.Clone the repository or download the script file.

2.Install the required library using the command above.

3.Run the script with:

python drug_interaction_finder.py

4.Enter the names of the drugs (space-separated) when prompted. For example:

Enter the drug names (space-separated, e.g., Atenolol Phenytoin Xanthine):

5.The script will:

  • Fetch interaction data for the drugs from PubChem.
  • Save the data in CSV files (one per drug).
  • Search for interactions between the specified drugs.
  • Display any detected interactions in the terminal.

Example Output

Enter the drug names (space-separated, e.g., Atenolol Phenytoin Xanthine): Atenolol Phenytoin
Fetching data for Atenolol...
Data for Atenolol saved to 'Atenolol_response.csv'
Fetching data for Phenytoin...
Data for Phenytoin saved to 'Phenytoin_response.csv'

Detected Interactions:
Atenolol - Phenytoin: Increases serum levels of Phenytoin

Contributing

Contributions are welcome! Feel free to submit a pull request or open an issue for suggestions and bug reports.

Acknowledgements

Special thanks PubChem for robust database.

About

Drug Interaction Checker is a Python tool that uses PubChem's API to identify and analyze interactions between specified drugs. It fetches interaction data, processes it into CSV files, and highlights interactions directly in the terminal. Designed for medical professionals and researchers, the tool is simple, efficient, and customizable.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages