builtsimple-research 1.0.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.
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: builtsimple-research
3
+ Version: 1.0.0
4
+ Summary: Unified API for PubMed, ArXiv, and Wikipedia semantic search
5
+ Project-URL: Homepage, https://built-simple.ai
6
+ Project-URL: Repository, https://github.com/Built-Simple/python-builtsimple
7
+ Author: Built-Simple.ai
8
+ License-Expression: MIT
9
+ Keywords: api,arxiv,pubmed,research,semantic-search,wikipedia
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Dist: httpx>=0.24.0
15
+ Description-Content-Type: text/markdown
16
+
17
+ # builtsimple-research
18
+
19
+ Unified API for searching PubMed, ArXiv, and Wikipedia.
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ pip install builtsimple-research
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ### Async (recommended)
30
+ ```python
31
+ import asyncio
32
+ from builtsimple_research import search_pubmed, search_arxiv, search_wikipedia, search_all
33
+
34
+ async def main():
35
+ # Search individual sources
36
+ pubmed = await search_pubmed("cancer treatment", limit=5)
37
+ arxiv = await search_arxiv("transformer attention", limit=5)
38
+ wiki = await search_wikipedia("machine learning", limit=5)
39
+
40
+ # Search all at once
41
+ all_results = await search_all("neural networks", limit=5)
42
+
43
+ asyncio.run(main())
44
+ ```
45
+
46
+ ### Sync
47
+ ```python
48
+ from builtsimple_research import search_pubmed_sync, search_arxiv_sync, search_wikipedia_sync
49
+
50
+ results = search_pubmed_sync("cancer treatment", limit=5)
51
+ ```
52
+
53
+ ## API
54
+
55
+ - `search_pubmed(query, limit=10)` - 4.5M+ biomedical articles
56
+ - `search_arxiv(query, limit=10)` - Scientific preprints
57
+ - `search_wikipedia(query, limit=10)` - 4.8M+ articles
58
+ - `search_all(query, limit=10)` - All sources in parallel
59
+
60
+ ## License
61
+
62
+ MIT - Built-Simple.ai
@@ -0,0 +1,46 @@
1
+ # builtsimple-research
2
+
3
+ Unified API for searching PubMed, ArXiv, and Wikipedia.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install builtsimple-research
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Async (recommended)
14
+ ```python
15
+ import asyncio
16
+ from builtsimple_research import search_pubmed, search_arxiv, search_wikipedia, search_all
17
+
18
+ async def main():
19
+ # Search individual sources
20
+ pubmed = await search_pubmed("cancer treatment", limit=5)
21
+ arxiv = await search_arxiv("transformer attention", limit=5)
22
+ wiki = await search_wikipedia("machine learning", limit=5)
23
+
24
+ # Search all at once
25
+ all_results = await search_all("neural networks", limit=5)
26
+
27
+ asyncio.run(main())
28
+ ```
29
+
30
+ ### Sync
31
+ ```python
32
+ from builtsimple_research import search_pubmed_sync, search_arxiv_sync, search_wikipedia_sync
33
+
34
+ results = search_pubmed_sync("cancer treatment", limit=5)
35
+ ```
36
+
37
+ ## API
38
+
39
+ - `search_pubmed(query, limit=10)` - 4.5M+ biomedical articles
40
+ - `search_arxiv(query, limit=10)` - Scientific preprints
41
+ - `search_wikipedia(query, limit=10)` - 4.8M+ articles
42
+ - `search_all(query, limit=10)` - All sources in parallel
43
+
44
+ ## License
45
+
46
+ MIT - Built-Simple.ai
@@ -0,0 +1,76 @@
1
+ """Built Simple Research - Unified API for PubMed, ArXiv, and Wikipedia"""
2
+ import httpx
3
+ from typing import List, Optional, Dict, Any
4
+
5
+ __version__ = "1.0.0"
6
+
7
+ BASE_URLS = {
8
+ "pubmed": "https://pubmed.built-simple.ai",
9
+ "arxiv": "https://arxiv.built-simple.ai",
10
+ "wikipedia": "https://wikipedia.built-simple.ai"
11
+ }
12
+
13
+ async def search_pubmed(query: str, limit: int = 10) -> List[Dict[str, Any]]:
14
+ """Search PubMed biomedical literature."""
15
+ async with httpx.AsyncClient() as client:
16
+ response = await client.post(
17
+ f"{BASE_URLS['pubmed']}/search",
18
+ json={"query": query, "limit": limit}
19
+ )
20
+ data = response.json()
21
+ return [{"source": "PubMed", **r} for r in data.get("results", [])]
22
+
23
+ async def search_arxiv(query: str, limit: int = 10) -> List[Dict[str, Any]]:
24
+ """Search ArXiv scientific preprints."""
25
+ async with httpx.AsyncClient() as client:
26
+ response = await client.get(
27
+ f"{BASE_URLS['arxiv']}/api/search",
28
+ params={"q": query, "limit": limit}
29
+ )
30
+ data = response.json()
31
+ return [{"source": "ArXiv", **r} for r in data.get("results", [])]
32
+
33
+ async def search_wikipedia(query: str, limit: int = 10) -> List[Dict[str, Any]]:
34
+ """Search Wikipedia articles."""
35
+ async with httpx.AsyncClient() as client:
36
+ response = await client.post(
37
+ f"{BASE_URLS['wikipedia']}/api/search",
38
+ json={"query": query, "limit": limit}
39
+ )
40
+ data = response.json()
41
+ return [{"source": "Wikipedia", **r} for r in data.get("results", [])]
42
+
43
+ async def search_all(query: str, limit: int = 10) -> List[Dict[str, Any]]:
44
+ """Search all sources in parallel."""
45
+ import asyncio
46
+ results = await asyncio.gather(
47
+ search_pubmed(query, limit),
48
+ search_arxiv(query, limit),
49
+ search_wikipedia(query, limit)
50
+ )
51
+ return results[0] + results[1] + results[2]
52
+
53
+ # Sync versions for convenience
54
+ def search_pubmed_sync(query: str, limit: int = 10) -> List[Dict[str, Any]]:
55
+ """Synchronous PubMed search."""
56
+ response = httpx.post(
57
+ f"{BASE_URLS['pubmed']}/search",
58
+ json={"query": query, "limit": limit}
59
+ )
60
+ return [{"source": "PubMed", **r} for r in response.json().get("results", [])]
61
+
62
+ def search_arxiv_sync(query: str, limit: int = 10) -> List[Dict[str, Any]]:
63
+ """Synchronous ArXiv search."""
64
+ response = httpx.get(
65
+ f"{BASE_URLS['arxiv']}/api/search",
66
+ params={"q": query, "limit": limit}
67
+ )
68
+ return [{"source": "ArXiv", **r} for r in response.json().get("results", [])]
69
+
70
+ def search_wikipedia_sync(query: str, limit: int = 10) -> List[Dict[str, Any]]:
71
+ """Synchronous Wikipedia search."""
72
+ response = httpx.post(
73
+ f"{BASE_URLS['wikipedia']}/api/search",
74
+ json={"query": query, "limit": limit}
75
+ )
76
+ return [{"source": "Wikipedia", **r} for r in response.json().get("results", [])]
@@ -0,0 +1,23 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "builtsimple-research"
7
+ version = "1.0.0"
8
+ description = "Unified API for PubMed, ArXiv, and Wikipedia semantic search"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ authors = [{ name = "Built-Simple.ai" }]
12
+ keywords = ["pubmed", "arxiv", "wikipedia", "research", "semantic-search", "api"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Science/Research",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ ]
19
+ dependencies = ["httpx>=0.24.0"]
20
+
21
+ [project.urls]
22
+ Homepage = "https://built-simple.ai"
23
+ Repository = "https://github.com/Built-Simple/python-builtsimple"