Skip to content

Python scraper based on AI

add: installation of extra dependencies

PeriniM0751e39c907a
diff --git a/requirements-dev.txt b/requirements-dev.txt
new file mode 100644
index 00000000..0bc50efc
--- /dev/null
+++ b/requirements-dev.txt
@@ -0,0 +1,5 @@
+wheel==0.42.0
+twine==4.0.2
+sphinx==7.1.2
+sphinx-rtd-theme==2.0.0
+pytest==8.0.0
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index 439ce74a..503382fb 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,11 +3,5 @@ langchain==0.1.4
langchain_core==0.1.16
langchain_openai==0.0.5
Requests==2.31.0
-pytest==8.0.0
tiktoken==0.5.2
-
-python-dotenv==1.0.1
-wheel==0.42.0
-twine==4.0.2
-sphinx==7.1.2
-sphinx-rtd-theme==2.0.0
\ No newline at end of file
+python-dotenv==1.0.1
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 0cab4bf3..ebf98490 100644
--- a/setup.py
+++ b/setup.py
@@ -1,11 +1,19 @@
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
+# Function to read the contents of a requirements file
+def load_requirements(filename):
+ with open(filename, 'r', encoding='utf-8') as file:
+ return file.read().splitlines()
+
+prod_requirements = load_requirements('requirements.txt')
+dev_requirements = load_requirements('requirements-dev.txt')
+
setup(
name='yosoai',
version='0.1.0', # MAJOR.MINOR.PATCH
description='A web scraping library using langchain',
- long_description='A web scraping library using langchain but a longer description',
+ long_description=open('README.md', encoding='utf-8').read(),
long_description_content_type='text/markdown',
url='https://yoso-ai.readthedocs.io/',
author='Marco Vinciguerra',
@@ -24,15 +32,11 @@ setup(
'Operating System :: OS Independent',
],
packages = ['yosoai'],
+ python_requires='>=3.9 , !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*, !=3.8.*',
include_package_data=True,
# https://packaging.python.org/en/latest/discussions/install-requires-vs-requirements/
- install_requires=[
- 'beautifulsoup4',
- 'langchain',
- 'langchain_core',
- 'langchain_openai',
- 'Requests',
- 'pytest',
- 'tiktoken',
- ]
+ install_requires=prod_requirements,
+ extras_require={
+ 'dev': prod_requirements + dev_requirements,
+ },
)
diff --git a/yosoai/__init__.py b/yosoai/__init__.py
index e69de29b..fc00b1fe 100644
--- a/yosoai/__init__.py
+++ b/yosoai/__init__.py
@@ -0,0 +1,4 @@
+from .class_creator import create_class
+from .class_generator import Generator
+from .pydantic_class import _Response
+from .getter import remover
\ No newline at end of file