neuller 1.0.3__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.
neuller-1.0.3/PKG-INFO ADDED
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.4
2
+ Name: neuller
3
+ Version: 1.0.3
4
+ Summary: Premium SearchCloud built for AI agents and LLMs
5
+ Author: Neuller
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: requests>=2.25.0
10
+ Dynamic: author
11
+ Dynamic: classifier
12
+ Dynamic: description
13
+ Dynamic: description-content-type
14
+ Dynamic: requires-dist
15
+ Dynamic: summary
16
+
17
+ # Neuller: Search Built for AI 🚀
18
+
19
+ The official Python SDK for the Neuller SearchCloud—a high-performance search engine built specifically for AI agents and LLMs.
20
+
21
+ ## Installation
22
+
23
+ ```sh
24
+ pip install neuller
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ The primary API for interacting with the Neuller search index is the Responses API. You can generate search results with the code below.
30
+
31
+ ```python
32
+ import os
33
+ from neuller import Neuller
34
+
35
+ client = Neuller(
36
+ # This is the default and can be omitted
37
+ api_key=os.environ.get("API_KEY"),
38
+ )
39
+
40
+ # Fetch Search Results
41
+ response = client.responses.create(
42
+ q='who is the ceo of google',
43
+ content=True
44
+ )
45
+
46
+ print(response)
47
+ ```
48
+
49
+ ### Retrieving Specific Web Content
50
+
51
+ If you have a specific URL and want to extract its parsed content using the Neuller SearchCloud:
52
+
53
+ ```python
54
+ # Fetch URL Content
55
+ content_response = client.content.retrieve(
56
+ url='https://en.wikipedia.org/wiki/Search_engine'
57
+ )
58
+
59
+ # In Python, print() will show the full dictionary/nested lists automatically
60
+ print(content_response)
61
+ ```
62
+
63
+ ## Error Handling
64
+
65
+ If the Neuller API returns an error representing an invalid request (e.g. invalid API key, missing query), standard Python Exceptions will be raised.
66
+
67
+ ```python
68
+ try:
69
+ client.responses.create(q='')
70
+ except Exception as e:
71
+ print(f"Failed: {e}")
72
+ ```
@@ -0,0 +1,56 @@
1
+ # Neuller: Search Built for AI 🚀
2
+
3
+ The official Python SDK for the Neuller SearchCloud—a high-performance search engine built specifically for AI agents and LLMs.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ pip install neuller
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ The primary API for interacting with the Neuller search index is the Responses API. You can generate search results with the code below.
14
+
15
+ ```python
16
+ import os
17
+ from neuller import Neuller
18
+
19
+ client = Neuller(
20
+ # This is the default and can be omitted
21
+ api_key=os.environ.get("API_KEY"),
22
+ )
23
+
24
+ # Fetch Search Results
25
+ response = client.responses.create(
26
+ q='who is the ceo of google',
27
+ content=True
28
+ )
29
+
30
+ print(response)
31
+ ```
32
+
33
+ ### Retrieving Specific Web Content
34
+
35
+ If you have a specific URL and want to extract its parsed content using the Neuller SearchCloud:
36
+
37
+ ```python
38
+ # Fetch URL Content
39
+ content_response = client.content.retrieve(
40
+ url='https://en.wikipedia.org/wiki/Search_engine'
41
+ )
42
+
43
+ # In Python, print() will show the full dictionary/nested lists automatically
44
+ print(content_response)
45
+ ```
46
+
47
+ ## Error Handling
48
+
49
+ If the Neuller API returns an error representing an invalid request (e.g. invalid API key, missing query), standard Python Exceptions will be raised.
50
+
51
+ ```python
52
+ try:
53
+ client.responses.create(q='')
54
+ except Exception as e:
55
+ print(f"Failed: {e}")
56
+ ```
@@ -0,0 +1,71 @@
1
+ import os
2
+ import requests
3
+
4
+ class NeullerResponses:
5
+ def __init__(self, client):
6
+ self._client = client
7
+
8
+ def create(self, q: str, content: bool = False):
9
+ try:
10
+ response = self._client.post(
11
+ f"{self._client.base_url}/search",
12
+ json={"q": q, "content": content}
13
+ )
14
+ response.raise_for_status()
15
+ return response.json()
16
+ except requests.exceptions.RequestException as e:
17
+ self._handle_error(e)
18
+
19
+ def _handle_error(self, e):
20
+ if e.response is not None:
21
+ try:
22
+ error_data = e.response.json()
23
+ msg = error_data.get('error', e.response.reason)
24
+ except ValueError:
25
+ msg = e.response.text
26
+ raise Exception(f"Neuller API Error ({e.response.status_code}): {msg}")
27
+ raise e
28
+
29
+ class NeullerContent:
30
+ def __init__(self, client):
31
+ self._client = client
32
+
33
+ def retrieve(self, url: str):
34
+ try:
35
+ response = self._client.post(
36
+ f"{self._client.base_url}/search/content",
37
+ json={"url": url}
38
+ )
39
+ response.raise_for_status()
40
+ return response.json()
41
+ except requests.exceptions.RequestException as e:
42
+ self._handle_error(e)
43
+
44
+ def _handle_error(self, e):
45
+ if e.response is not None:
46
+ try:
47
+ error_data = e.response.json()
48
+ msg = error_data.get('error', e.response.reason)
49
+ except ValueError:
50
+ msg = e.response.text
51
+ raise Exception(f"Neuller API Error ({e.response.status_code}): {msg}")
52
+ raise e
53
+
54
+ class Neuller:
55
+ def __init__(self, api_key: str = None, base_url: str = None):
56
+ self.api_key = api_key or os.environ.get("API_KEY")
57
+ if not self.api_key:
58
+ raise ValueError("The Neuller API Key must be provided (either via api_key or the API_KEY environment variable).")
59
+
60
+ self.base_url = base_url or 'https://api.neuller.com/api/v1'
61
+
62
+ self.session = requests.Session()
63
+ self.session.headers.update({
64
+ "x-api-key": self.api_key,
65
+ "Content-Type": "application/json"
66
+ })
67
+
68
+ self.post = self.session.post
69
+
70
+ self.responses = NeullerResponses(self)
71
+ self.content = NeullerContent(self)
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.4
2
+ Name: neuller
3
+ Version: 1.0.3
4
+ Summary: Premium SearchCloud built for AI agents and LLMs
5
+ Author: Neuller
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: requests>=2.25.0
10
+ Dynamic: author
11
+ Dynamic: classifier
12
+ Dynamic: description
13
+ Dynamic: description-content-type
14
+ Dynamic: requires-dist
15
+ Dynamic: summary
16
+
17
+ # Neuller: Search Built for AI 🚀
18
+
19
+ The official Python SDK for the Neuller SearchCloud—a high-performance search engine built specifically for AI agents and LLMs.
20
+
21
+ ## Installation
22
+
23
+ ```sh
24
+ pip install neuller
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ The primary API for interacting with the Neuller search index is the Responses API. You can generate search results with the code below.
30
+
31
+ ```python
32
+ import os
33
+ from neuller import Neuller
34
+
35
+ client = Neuller(
36
+ # This is the default and can be omitted
37
+ api_key=os.environ.get("API_KEY"),
38
+ )
39
+
40
+ # Fetch Search Results
41
+ response = client.responses.create(
42
+ q='who is the ceo of google',
43
+ content=True
44
+ )
45
+
46
+ print(response)
47
+ ```
48
+
49
+ ### Retrieving Specific Web Content
50
+
51
+ If you have a specific URL and want to extract its parsed content using the Neuller SearchCloud:
52
+
53
+ ```python
54
+ # Fetch URL Content
55
+ content_response = client.content.retrieve(
56
+ url='https://en.wikipedia.org/wiki/Search_engine'
57
+ )
58
+
59
+ # In Python, print() will show the full dictionary/nested lists automatically
60
+ print(content_response)
61
+ ```
62
+
63
+ ## Error Handling
64
+
65
+ If the Neuller API returns an error representing an invalid request (e.g. invalid API key, missing query), standard Python Exceptions will be raised.
66
+
67
+ ```python
68
+ try:
69
+ client.responses.create(q='')
70
+ except Exception as e:
71
+ print(f"Failed: {e}")
72
+ ```
@@ -0,0 +1,8 @@
1
+ README.md
2
+ setup.py
3
+ neuller/__init__.py
4
+ neuller.egg-info/PKG-INFO
5
+ neuller.egg-info/SOURCES.txt
6
+ neuller.egg-info/dependency_links.txt
7
+ neuller.egg-info/requires.txt
8
+ neuller.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ requests>=2.25.0
@@ -0,0 +1 @@
1
+ neuller
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
neuller-1.0.3/setup.py ADDED
@@ -0,0 +1,18 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='neuller',
5
+ version='1.0.3',
6
+ description='Premium SearchCloud built for AI agents and LLMs',
7
+ long_description=open('README.md').read(),
8
+ long_description_content_type='text/markdown',
9
+ author='Neuller',
10
+ packages=find_packages(),
11
+ install_requires=[
12
+ 'requests>=2.25.0',
13
+ ],
14
+ classifiers=[
15
+ 'Programming Language :: Python :: 3',
16
+ 'License :: OSI Approved :: MIT License',
17
+ ],
18
+ )