From 6c7a59f86838aca68b41195addf1f0f1e68b8213 Mon Sep 17 00:00:00 2001 From: William Jolivet Date: Tue, 15 Oct 2024 15:48:14 +0200 Subject: [PATCH] remove: == on dependencies --- README.md | 2 +- llm_price_scraper/enums.py | 1 + llm_price_scraper/scrapers/__init__.py | 4 ++++ llm_price_scraper/scrapers/openai.py | 8 ++++++++ requirements.txt | 4 ++-- setup.py | 6 +++--- 6 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 llm_price_scraper/scrapers/openai.py diff --git a/README.md b/README.md index 15a8c3f..897500c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ from the following sources: ## Installation You can install the package using pip: ```bash -pip install llm-price-scraper==1.0.2 +pip install llm-price-scraper==1.0.3 ``` ## Usage diff --git a/llm_price_scraper/enums.py b/llm_price_scraper/enums.py index 488783c..ac9550e 100644 --- a/llm_price_scraper/enums.py +++ b/llm_price_scraper/enums.py @@ -5,3 +5,4 @@ class DataSources(Enum): BOTGENUITY = "botgenuity" HUGGINGFACE = "huggingface" HUHUHANG = "huhuhang" + OPENAI = "openai" diff --git a/llm_price_scraper/scrapers/__init__.py b/llm_price_scraper/scrapers/__init__.py index 915ab45..56e8d2e 100644 --- a/llm_price_scraper/scrapers/__init__.py +++ b/llm_price_scraper/scrapers/__init__.py @@ -3,6 +3,7 @@ from llm_price_scraper.scrapers.docsbot import DocsBotScraper from llm_price_scraper.scrapers.huggingface import HuggingfaceScraper from llm_price_scraper.scrapers.huhuhang import HuhuhangScraper +from llm_price_scraper.scrapers.openai import OpenaiScraper class LlmPricingScraper: @staticmethod @@ -20,5 +21,8 @@ def scrape(source: DataSources = DataSources.HUGGINGFACE): return HuggingfaceScraper.scrape() elif source == DataSources.HUHUHANG: return HuhuhangScraper.scrape() + elif source == DataSources.OPENAI: + raise Exception(f"Source '{source}' is not supported.") + # return OpenaiScraper.scrape() else: raise Exception(f"Source '{source}' is not supported.") diff --git a/llm_price_scraper/scrapers/openai.py b/llm_price_scraper/scrapers/openai.py new file mode 100644 index 0000000..7f5e551 --- /dev/null +++ b/llm_price_scraper/scrapers/openai.py @@ -0,0 +1,8 @@ +import requests +from datetime import datetime +from llm_price_scraper.models import LLMModelPricing + +class OpenaiScraper: + @staticmethod + def scrape(): + pass \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index fdcea20..5a5eeba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -requests==2.32.3 -beautifulsoup4==4.12.3 \ No newline at end of file +requests>=2.32.3 +beautifulsoup4>=4.12.3 \ No newline at end of file diff --git a/setup.py b/setup.py index f0ec896..8ce9ded 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,11 @@ setup( name="llm_price_scraper", - version="1.0.2", + version="1.0.3", packages=find_packages(), install_requires=[ - "requests==2.32.3", - "beautifulsoup4==4.12.3" + "requests>=2.32.3", + "beautifulsoup4>=4.12.3" ], author="WilliamJlvt", description="A simple Python SDK to scrape and retrieve pricing information for Large Language Models (LLMs) from an external webpage, with structured models for easy integration and usage.",