A Python Client SDK for the Linkup API
Project description
🚀 Linkup Python SDK
A Python SDK for the Linkup API, allowing easy integration with Linkup's services. 🐍
🌟 Features
- ✅ Simple and intuitive API client.
- 🔍 Supports both standard and deep search queries.
- 🔒 Handles authentication and request management.
📦 Installation
Install the SDK using pip:
pip install linkup-sdk
🛠️ Usage
Setting Up Your Environment
-
🔑 Obtain an API Key:
Sign up on Linkup to get your API key.
-
⚙️ Set the API Key as an Environment Variable:
Option 1: Export the LINKUP_API_KEY environment variable in your shell before using the Python SDK.
export LINKUP_API_KEY='YOUR_LINKUP_API_KEY'
Option 2: Set the
LINKUP_API_KEYenvironment variable directly within Python, using for instanceos.environor python-dotenv with a.envfile (python-dotenv needs to be installed separately in this case), before creating the Linkup Client.import os from linkup import LinkupClient os.environ["LINKUP_API_KEY"] = "YOUR_LINKUP_API_KEY" # or dotenv.load_dotenv() client = LinkupClient() ...
Option 3: Pass the Linkup API key to the Linkup Client when creating it.
from linkup import LinkupClient client = LinkupClient(api_key="YOUR_LINKUP_API_KEY") ...
📋 Example
from linkup import LinkupClient
# Initialize the client (API key can be read from the environment variable or passed as an argument)
client = LinkupClient()
# Perform a search query
search_response = client.search(
query="What are the 3 major events in the life of Abraham Lincoln?",
depth="standard", # or "deep"
output_type="searchResults", # or "sourcedAnswer" or "structured"
structured_output_schema=None, # must be filled if output_type is "structured"
)
print(search_response)
# Get access to our Premium Sources Partners content
content_response = client.content(
url="https://www.thebridgechronicle.com/news/capgemini-employees-walk-together-in-celebration-"
"of-indias-independence",
)
print(content_response)
See the examples/ directory for more examples and documentation, for instance on how to use Linkup
entrypoints using asynchronous functions.
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 linkup_sdk-0.1.6.tar.gz.
File metadata
- Download URL: linkup_sdk-0.1.6.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35091d0e0d004a71c7558d01a729a93951cf503b1dce5017143e569108934c48
|
|
| MD5 |
69f8cbdd45cd79dca14f945fe2ab9f01
|
|
| BLAKE2b-256 |
7da6f62ab486008bc0c18ae388e6dbf09d69beba3c11536a726623143c00b4d5
|
Provenance
The following attestation bundles were made for linkup_sdk-0.1.6.tar.gz:
Publisher:
publish-to-pypi.yml on LinkupPlatform/linkup-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
linkup_sdk-0.1.6.tar.gz -
Subject digest:
35091d0e0d004a71c7558d01a729a93951cf503b1dce5017143e569108934c48 - Sigstore transparency entry: 150159900
- Sigstore integration time:
-
Permalink:
LinkupPlatform/linkup-python-sdk@6edc8039a79fa99370b0c6475cc651884aaa744e -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/LinkupPlatform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@6edc8039a79fa99370b0c6475cc651884aaa744e -
Trigger Event:
push
-
Statement type:
File details
Details for the file linkup_sdk-0.1.6-py3-none-any.whl.
File metadata
- Download URL: linkup_sdk-0.1.6-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bf81deae872c1667c65e2357683ec51532e1b01501091501e3be478a1841cda
|
|
| MD5 |
9ec449c160d3d57143aae824ae108142
|
|
| BLAKE2b-256 |
770a2e26c9f0c2fa82333e6c6f0938f0e9119c9db14bfd6a0223910b72d16cf3
|
Provenance
The following attestation bundles were made for linkup_sdk-0.1.6-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on LinkupPlatform/linkup-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
linkup_sdk-0.1.6-py3-none-any.whl -
Subject digest:
7bf81deae872c1667c65e2357683ec51532e1b01501091501e3be478a1841cda - Sigstore transparency entry: 150159904
- Sigstore integration time:
-
Permalink:
LinkupPlatform/linkup-python-sdk@6edc8039a79fa99370b0c6475cc651884aaa744e -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/LinkupPlatform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@6edc8039a79fa99370b0c6475cc651884aaa744e -
Trigger Event:
push
-
Statement type: