tavily-python 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tavily-python-0.1.0/PKG-INFO +11 -0
- tavily-python-0.1.0/README.rst +68 -0
- tavily-python-0.1.0/setup.cfg +8 -0
- tavily-python-0.1.0/setup.py +18 -0
- tavily-python-0.1.0/tavily_python.egg-info/PKG-INFO +11 -0
- tavily-python-0.1.0/tavily_python.egg-info/SOURCES.txt +8 -0
- tavily-python-0.1.0/tavily_python.egg-info/dependency_links.txt +1 -0
- tavily-python-0.1.0/tavily_python.egg-info/requires.txt +1 -0
- tavily-python-0.1.0/tavily_python.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: tavily-python
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python wrapper for the Tavily API
|
|
5
|
+
Home-page: https://github.com/assafelovic/tavily-python
|
|
6
|
+
Author: Assaf Elovic
|
|
7
|
+
Author-email: assaf.elovic@gmail.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.6
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
======================
|
|
2
|
+
Tavily Python Wrapper
|
|
3
|
+
======================
|
|
4
|
+
|
|
5
|
+
This Python wrapper allows for easy interaction with the Tavily API, providing both basic and advanced search functionalities directly from your Python programs. Easily integrate smart search capabilities into your applications, utilizing Tavily's powerful search features.
|
|
6
|
+
|
|
7
|
+
Installing
|
|
8
|
+
==========
|
|
9
|
+
|
|
10
|
+
.. code-block:: bash
|
|
11
|
+
|
|
12
|
+
pip install tavily-python
|
|
13
|
+
|
|
14
|
+
Usage
|
|
15
|
+
=====
|
|
16
|
+
|
|
17
|
+
.. code-block:: python
|
|
18
|
+
|
|
19
|
+
from tavily import Client
|
|
20
|
+
search = Client(api_key="YOUR_API_KEY")
|
|
21
|
+
search.basic_search(query="Should I invest in Apple in 2024?", include_raw_content=True)
|
|
22
|
+
|
|
23
|
+
API Methods
|
|
24
|
+
===========
|
|
25
|
+
|
|
26
|
+
Client
|
|
27
|
+
------
|
|
28
|
+
|
|
29
|
+
The ``Client`` class is the entry point to interacting with the Tavily API. Instantiate it with your API key to get started.
|
|
30
|
+
|
|
31
|
+
Methods
|
|
32
|
+
-------
|
|
33
|
+
|
|
34
|
+
- ``basic_search(query, **kwargs)``: Performs a basic, smart search optimized for performance (quick response time) the specified query and additional parameters as keyword arguments.
|
|
35
|
+
|
|
36
|
+
- ``advanced_search(query, **kwargs)``: Performs an advanced, in-depth search optimized for quality (factual and unbiased) with the specified query and additional parameters as keyword arguments.
|
|
37
|
+
|
|
38
|
+
Keyword Arguments
|
|
39
|
+
-----------------
|
|
40
|
+
|
|
41
|
+
- ``search_depth`` (str): The depth of the search. It can be "basic" or "advanced". Default is "basic" for `basic_search` and "advanced" for `advanced_search`.
|
|
42
|
+
|
|
43
|
+
- ``num_results`` (int): The number of search results to return. Default is 5.
|
|
44
|
+
|
|
45
|
+
- ``include_domains`` (list): A list of domains to specifically include in the search results. Default is None, which includes all domains.
|
|
46
|
+
|
|
47
|
+
- ``exclude_domains`` (list): A list of domains to specifically exclude from the search results. Default is None, which does not exclude any domains.
|
|
48
|
+
|
|
49
|
+
- ``include_answer`` (bool): Whether or not to include answers in the search results. Default is False.
|
|
50
|
+
|
|
51
|
+
- ``include_raw_content`` (bool): Whether or not to include raw content in the search results. Default is False.
|
|
52
|
+
|
|
53
|
+
Both methods internally use the ``_search`` method to communicate with the API.
|
|
54
|
+
|
|
55
|
+
Error Handling
|
|
56
|
+
==============
|
|
57
|
+
|
|
58
|
+
In case of an unsuccessful HTTP request, a ``HTTPError`` will be raised.
|
|
59
|
+
|
|
60
|
+
License
|
|
61
|
+
=======
|
|
62
|
+
|
|
63
|
+
This project is licensed under the terms of the MIT license.
|
|
64
|
+
|
|
65
|
+
Contact
|
|
66
|
+
=======
|
|
67
|
+
|
|
68
|
+
For questions, support, or to learn more, please visit `Tavily <http://tavily.com>`_.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name='tavily-python',
|
|
5
|
+
version='0.1.0',
|
|
6
|
+
url='https://github.com/assafelovic/tavily-python',
|
|
7
|
+
author='Assaf Elovic',
|
|
8
|
+
author_email='assaf.elovic@gmail.com',
|
|
9
|
+
description='Python wrapper for the Tavily API',
|
|
10
|
+
packages=find_packages(),
|
|
11
|
+
install_requires=['requests'],
|
|
12
|
+
classifiers=[
|
|
13
|
+
'Programming Language :: Python :: 3',
|
|
14
|
+
'License :: OSI Approved :: MIT License',
|
|
15
|
+
'Operating System :: OS Independent',
|
|
16
|
+
],
|
|
17
|
+
python_requires='>=3.6',
|
|
18
|
+
)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: tavily-python
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python wrapper for the Tavily API
|
|
5
|
+
Home-page: https://github.com/assafelovic/tavily-python
|
|
6
|
+
Author: Assaf Elovic
|
|
7
|
+
Author-email: assaf.elovic@gmail.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
requests
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|