exa-py 1.8.4__tar.gz → 1.8.5__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.

Potentially problematic release.


This version of exa-py might be problematic. Click here for more details.

@@ -1,19 +1,19 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: exa-py
3
- Version: 1.8.4
3
+ Version: 1.8.5
4
4
  Summary: Python SDK for Exa API.
5
- Home-page: https://github.com/exa-labs/exa-py
6
- Author: Exa
5
+ Author: Exa AI
7
6
  Author-email: hello@exa.ai
8
- Classifier: Development Status :: 5 - Production/Stable
9
- Classifier: Intended Audience :: Developers
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Typing :: Typed
12
- Classifier: Programming Language :: Python :: 3.8
7
+ Requires-Python: >=3.9,<4.0
8
+ Classifier: Programming Language :: Python :: 3
13
9
  Classifier: Programming Language :: Python :: 3.9
14
10
  Classifier: Programming Language :: Python :: 3.10
15
11
  Classifier: Programming Language :: Python :: 3.11
16
12
  Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Dist: openai (>=1.48,<2.0)
15
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
16
+ Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
17
17
  Description-Content-Type: text/markdown
18
18
 
19
19
  # Exa
@@ -102,3 +102,4 @@ exa = Exa(api_key="your-api-key")
102
102
  print(chunk)
103
103
  ```
104
104
 
105
+
@@ -517,15 +517,17 @@ class AnswerResult:
517
517
  url: str
518
518
  id: str
519
519
  title: Optional[str] = None
520
- published_date: Optional[str] = None
521
520
  author: Optional[str] = None
521
+ published_date: Optional[str] = None
522
+ text: Optional[str] = None
522
523
 
523
524
  def __init__(self, **kwargs):
524
- self.url = kwargs["url"]
525
- self.id = kwargs["id"]
526
- self.title = kwargs.get("title")
527
- self.published_date = kwargs.get("published_date")
528
- self.author = kwargs.get("author")
525
+ self.url = kwargs['url']
526
+ self.id = kwargs['id']
527
+ self.title = kwargs.get('title')
528
+ self.author = kwargs.get('author')
529
+ self.published_date = kwargs.get('published_date')
530
+ self.text = kwargs.get('text')
529
531
 
530
532
  def __str__(self):
531
533
  return (
@@ -534,6 +536,7 @@ class AnswerResult:
534
536
  f"ID: {self.id}\n"
535
537
  f"Published Date: {self.published_date}\n"
536
538
  f"Author: {self.author}\n"
539
+ f"Text: {self.text}\n"
537
540
  )
538
541
 
539
542
 
@@ -608,7 +611,7 @@ class Exa:
608
611
  self,
609
612
  api_key: Optional[str],
610
613
  base_url: str = "https://api.exa.ai",
611
- user_agent: str = "exa-py 1.8.4",
614
+ user_agent: str = "exa-py 1.8.5",
612
615
  ):
613
616
  """Initialize the Exa client with the provided API key and optional base URL and user agent.
614
617
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "exa-py"
3
- version = "1.8.3"
3
+ version = "1.8.5"
4
4
  description = "Python SDK for Exa API."
5
5
  authors = ["Exa AI <hello@exa.ai>"]
6
6
  readme = "README.md"
exa_py-1.8.4/PKG-INFO DELETED
@@ -1,104 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: exa_py
3
- Version: 1.8.4
4
- Summary: Python SDK for Exa API.
5
- Home-page: https://github.com/exa-labs/exa-py
6
- Author: Exa
7
- Author-email: hello@exa.ai
8
- Classifier: Development Status :: 5 - Production/Stable
9
- Classifier: Intended Audience :: Developers
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Typing :: Typed
12
- Classifier: Programming Language :: Python :: 3.8
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Programming Language :: Python :: 3.12
17
- Description-Content-Type: text/markdown
18
-
19
- # Exa
20
-
21
- Exa (formerly Metaphor) API in Python
22
-
23
- Note: This API is basically the same as `metaphor-python` but reflects new
24
- features associated with Metaphor's rename to Exa. New site is https://exa.ai
25
-
26
- ## Installation
27
-
28
- ```bash
29
- pip install exa_py
30
- ```
31
-
32
- ## Usage
33
-
34
- Import the package and initialize the Exa client with your API key:
35
-
36
- ```python
37
- from exa_py import Exa
38
-
39
- exa = Exa(api_key="your-api-key")
40
- ```
41
-
42
- ## Common requests
43
- ```python
44
-
45
- # basic search
46
- results = exa.search("This is a Exa query:")
47
-
48
- # autoprompted search
49
- results = exa.search("autopromptable query", use_autoprompt=True)
50
-
51
- # keyword search (non-neural)
52
- results = exa.search("Google-style query", type="keyword")
53
-
54
- # search with date filters
55
- results = exa.search("This is a Exa query:", start_published_date="2019-01-01", end_published_date="2019-01-31")
56
-
57
- # search with domain filters
58
- results = exa.search("This is a Exa query:", include_domains=["www.cnn.com", "www.nytimes.com"])
59
-
60
- # search and get text contents
61
- results = exa.search_and_contents("This is a Exa query:")
62
-
63
- # search and get highlights
64
- results = exa.search_and_contents("This is a Exa query:", highlights=True)
65
-
66
- # search and get contents with contents options
67
- results = exa.search_and_contents("This is a Exa query:",
68
- text={"include_html_tags": True, "max_characters": 1000},
69
- highlights={"highlights_per_url": 2, "num_sentences": 1, "query": "This is the highlight query:"})
70
-
71
- # find similar documents
72
- results = exa.find_similar("https://example.com")
73
-
74
- # find similar excluding source domain
75
- results = exa.find_similar("https://example.com", exclude_source_domain=True)
76
-
77
- # find similar with contents
78
- results = exa.find_similar_and_contents("https://example.com", text=True, highlights=True)
79
-
80
- # get text contents
81
- results = exa.get_contents(["urls"])
82
-
83
- # get highlights
84
- results = exa.get_contents(["urls"], highlights=True)
85
-
86
- # get contents with contents options
87
- results = exa.get_contents(["urls"],
88
- text={"include_html_tags": True, "max_characters": 1000},
89
- highlights={"highlights_per_url": 2, "num_sentences": 1, "query": "This is the highlight query:"})
90
-
91
- # basic answer
92
- response = exa.answer("This is a query to answer a question")
93
-
94
- # answer with expanded queries and full text
95
- response = exa.answer("This is a query to answer a question", expanded_queries_limit=3, include_text=True)
96
-
97
- # answer with streaming
98
- response = exa.answer("This is a query to answer with streaming:", stream=True)
99
-
100
- # Print each chunk as it arrives when answer streaming is enabled
101
- for chunk in response:
102
- print(chunk)
103
- ```
104
-
@@ -1,12 +0,0 @@
1
- README.md
2
- pyproject.toml
3
- setup.py
4
- exa_py/__init__.py
5
- exa_py/api.py
6
- exa_py/py.typed
7
- exa_py/utils.py
8
- exa_py.egg-info/PKG-INFO
9
- exa_py.egg-info/SOURCES.txt
10
- exa_py.egg-info/dependency_links.txt
11
- exa_py.egg-info/requires.txt
12
- exa_py.egg-info/top_level.txt
@@ -1,3 +0,0 @@
1
- requests
2
- typing-extensions
3
- openai>=1.10.0
@@ -1 +0,0 @@
1
- exa_py
exa_py-1.8.4/setup.cfg DELETED
@@ -1,4 +0,0 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
exa_py-1.8.4/setup.py DELETED
@@ -1,30 +0,0 @@
1
- from setuptools import setup, find_packages
2
-
3
- setup(
4
- name="exa_py",
5
- version="1.8.4",
6
- description="Python SDK for Exa API.",
7
- long_description_content_type="text/markdown",
8
- long_description=open("README.md").read(),
9
- author="Exa",
10
- author_email="hello@exa.ai",
11
- package_data={"exa_py": ["py.typed"]},
12
- url="https://github.com/exa-labs/exa-py",
13
- packages=find_packages(),
14
- install_requires=[
15
- "requests",
16
- "typing-extensions",
17
- "openai>=1.10.0"
18
- ],
19
- classifiers=[
20
- "Development Status :: 5 - Production/Stable",
21
- "Intended Audience :: Developers",
22
- "License :: OSI Approved :: MIT License",
23
- "Typing :: Typed",
24
- "Programming Language :: Python :: 3.8",
25
- "Programming Language :: Python :: 3.9",
26
- "Programming Language :: Python :: 3.10",
27
- "Programming Language :: Python :: 3.11",
28
- "Programming Language :: Python :: 3.12",
29
- ],
30
- )
File without changes
File without changes
File without changes
File without changes