Typed Python client for AnySearch.
Project description
anysearch-py
Typed Python clients for AnySearch.
The package has two first-class clients.
Client calls the REST Web API.
MCPClient calls the MCP tools/call API used by anysearch-skill/.
Both clients share the same Pydantic models, enums, validation, and serialization logic.
Install
uv add anysearch-py
REST Search
from anysearch_py import Client, SearchTag
with Client(api_key="YOUR_ANYSEARCH_API_KEY") as client:
response = client.search(
"Go 1.26 release notes",
tag=SearchTag.CODE_DOC,
params={"library": "golang"},
)
print(response.data.results[0].url)
Async REST Search
from anysearch_py import AsyncClient
async with AsyncClient(api_key="YOUR_ANYSEARCH_API_KEY") as client:
response = await client.search("what is quantum computing")
MCP Tools
from anysearch_py import Domain, MCPClient
with MCPClient(api_key="YOUR_ANYSEARCH_API_KEY") as client:
markdown = client.get_sub_domains(domains=[Domain.FINANCE, Domain.HEALTH])
print(markdown)
MCP Search
from anysearch_py import Domain, MCPClient
with MCPClient(api_key="YOUR_ANYSEARCH_API_KEY") as client:
markdown = client.search(
"AAPL",
domain=Domain.FINANCE,
sub_domain="finance.quote",
sub_domain_params="type=stock,symbol=AAPL,cn_code=",
max_results=5,
)
print(markdown)
Live Tests
Live tests read ANYSEARCH_API_KEY from .env or anysearch-skill/.env.
If neither file exists, those tests skip automatically.
Package code never reads .env.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anysearch_py-0.1.0.tar.gz.
File metadata
- Download URL: anysearch_py-0.1.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
938be98445fa5b4eda7ad75bbc443790a661e712ef6d51d6103a0041727401f4
|
|
| MD5 |
c3e06966e7dce252ff843dd8d276615c
|
|
| BLAKE2b-256 |
1fdff7ed70e97839a3e1981f992a15a1601d483e73bf873419b71aee87df0055
|
Provenance
The following attestation bundles were made for anysearch_py-0.1.0.tar.gz:
Publisher:
release.yml on WH-2099/anysearch-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anysearch_py-0.1.0.tar.gz -
Subject digest:
938be98445fa5b4eda7ad75bbc443790a661e712ef6d51d6103a0041727401f4 - Sigstore transparency entry: 1996136216
- Sigstore integration time:
-
Permalink:
WH-2099/anysearch-py@1b8d49a22c19db964aa607404123d14069a063bc -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/WH-2099
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1b8d49a22c19db964aa607404123d14069a063bc -
Trigger Event:
push
-
Statement type:
File details
Details for the file anysearch_py-0.1.0-py3-none-any.whl.
File metadata
- Download URL: anysearch_py-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abcfeeda18374287ac6f0aea089f2e287a15175dac5ecf188af8e278426d6bf4
|
|
| MD5 |
c700fac99b716ed0aa7752b33fe17e65
|
|
| BLAKE2b-256 |
1c0e906db48530bfafb3aa56aa2ce1667f40f78c60c719422e9d3bdf9a297f87
|
Provenance
The following attestation bundles were made for anysearch_py-0.1.0-py3-none-any.whl:
Publisher:
release.yml on WH-2099/anysearch-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anysearch_py-0.1.0-py3-none-any.whl -
Subject digest:
abcfeeda18374287ac6f0aea089f2e287a15175dac5ecf188af8e278426d6bf4 - Sigstore transparency entry: 1996136321
- Sigstore integration time:
-
Permalink:
WH-2099/anysearch-py@1b8d49a22c19db964aa607404123d14069a063bc -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/WH-2099
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1b8d49a22c19db964aa607404123d14069a063bc -
Trigger Event:
push
-
Statement type: