linkup-sdk


Namelinkup-sdk JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/LinkupPlatform/linkup-python-sdk
SummaryA Python Client SDK for the Linkup API
upload_time2024-12-10 16:57:58
maintainerNone
docs_urlNone
authorLINKUP TECHNOLOGIES
requires_python>=3.9
licenseMIT
keywords linkup api sdk client search
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🚀 Linkup Python SDK

[![PyPI version](https://badge.fury.io/py/linkup-sdk.svg)](https://pypi.org/project/linkup-sdk/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

A Python SDK for the [Linkup API](https://linkup-api.readme.io/reference/getting-started), allowing
easy integration with Linkup's services. 🐍

## 🌟 Features

- ✅ **Simple and intuitive API client.**
- 🔍 **Supports both standard and deep search queries.**
- ⚡ **Supports synchronous and asynchronous requests.**
- 🔒 **Handles authentication and request management.**

## 📦 Installation

Simply install the Linkup Python SDK using `pip`:

```bash
pip install linkup-sdk
```

## 🛠️ Usage

### Setting Up Your Environment

1. **🔑 Obtain an API Key:**

   Sign up on Linkup to get your API key.

2. **⚙️ Set-up the API Key:**

   Option 1: Export the `LINKUP_API_KEY` environment variable in your shell before using the Python
   SDK.

   ```bash
   export LINKUP_API_KEY='YOUR_LINKUP_API_KEY'
   ```

   Option 2: Set the `LINKUP_API_KEY` environment variable directly within Python, using for
   instance `os.environ` or [python-dotenv](https://github.com/theskumar/python-dotenv) with a
   `.env` file (`python-dotenv` needs to be installed separately in this case), before creating the
   Linkup Client.

   ```python
   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.

   ```python
   from linkup import LinkupClient

   client = LinkupClient(api_key="YOUR_LINKUP_API_KEY")
   ...
   ```

### 📋 Examples

All search queries can be used with two very different modes:

- with `depth="standard"`, the search will be straightforward and fast, suited for relatively simple
  queries (e.g. "What's the weather in Paris today?")
- with `depth="deep"`, the search will use an agentic workflow, which makes it in general slower,
  but it will be able to solve more complex queries (e.g. "What is the company profile of LangChain
  accross the last few years, and how does it compare to its concurrents?")

#### 📝 Standard Search Query

```python
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="deep",  # "standard" or "deep"
    output_type="sourcedAnswer",  # "searchResults" or "sourcedAnswer" or "structured"
    structured_output_schema=None,  # must be filled if output_type is "structured"
)
print(search_response)
```

#### 📚 More Examples

See the `examples/` directory for more examples and documentation, for instance on how to use Linkup
entrypoints using asynchronous functions.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/LinkupPlatform/linkup-python-sdk",
    "name": "linkup-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "linkup api sdk client search",
    "author": "LINKUP TECHNOLOGIES",
    "author_email": "contact@linkup.so",
    "download_url": "https://files.pythonhosted.org/packages/2e/ba/b06e8f2ca2f0ce255a40ee4505637536acfe83ec997cd8b61bd5cd031513/linkup_sdk-0.2.1.tar.gz",
    "platform": null,
    "description": "# \ud83d\ude80 Linkup Python SDK\n\n[![PyPI version](https://badge.fury.io/py/linkup-sdk.svg)](https://pypi.org/project/linkup-sdk/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nA Python SDK for the [Linkup API](https://linkup-api.readme.io/reference/getting-started), allowing\neasy integration with Linkup's services. \ud83d\udc0d\n\n## \ud83c\udf1f Features\n\n- \u2705 **Simple and intuitive API client.**\n- \ud83d\udd0d **Supports both standard and deep search queries.**\n- \u26a1 **Supports synchronous and asynchronous requests.**\n- \ud83d\udd12 **Handles authentication and request management.**\n\n## \ud83d\udce6 Installation\n\nSimply install the Linkup Python SDK using `pip`:\n\n```bash\npip install linkup-sdk\n```\n\n## \ud83d\udee0\ufe0f Usage\n\n### Setting Up Your Environment\n\n1. **\ud83d\udd11 Obtain an API Key:**\n\n   Sign up on Linkup to get your API key.\n\n2. **\u2699\ufe0f Set-up the API Key:**\n\n   Option 1: Export the `LINKUP_API_KEY` environment variable in your shell before using the Python\n   SDK.\n\n   ```bash\n   export LINKUP_API_KEY='YOUR_LINKUP_API_KEY'\n   ```\n\n   Option 2: Set the `LINKUP_API_KEY` environment variable directly within Python, using for\n   instance `os.environ` or [python-dotenv](https://github.com/theskumar/python-dotenv) with a\n   `.env` file (`python-dotenv` needs to be installed separately in this case), before creating the\n   Linkup Client.\n\n   ```python\n   import os\n   from linkup import LinkupClient\n\n   os.environ[\"LINKUP_API_KEY\"] = \"YOUR_LINKUP_API_KEY\"\n   # or dotenv.load_dotenv()\n   client = LinkupClient()\n   ...\n   ```\n\n   Option 3: Pass the Linkup API key to the Linkup Client when creating it.\n\n   ```python\n   from linkup import LinkupClient\n\n   client = LinkupClient(api_key=\"YOUR_LINKUP_API_KEY\")\n   ...\n   ```\n\n### \ud83d\udccb Examples\n\nAll search queries can be used with two very different modes:\n\n- with `depth=\"standard\"`, the search will be straightforward and fast, suited for relatively simple\n  queries (e.g. \"What's the weather in Paris today?\")\n- with `depth=\"deep\"`, the search will use an agentic workflow, which makes it in general slower,\n  but it will be able to solve more complex queries (e.g. \"What is the company profile of LangChain\n  accross the last few years, and how does it compare to its concurrents?\")\n\n#### \ud83d\udcdd Standard Search Query\n\n```python\nfrom linkup import LinkupClient\n\n# Initialize the client (API key can be read from the environment variable or passed as an argument)\nclient = LinkupClient()\n\n# Perform a search query\nsearch_response = client.search(\n    query=\"What are the 3 major events in the life of Abraham Lincoln?\",\n    depth=\"deep\",  # \"standard\" or \"deep\"\n    output_type=\"sourcedAnswer\",  # \"searchResults\" or \"sourcedAnswer\" or \"structured\"\n    structured_output_schema=None,  # must be filled if output_type is \"structured\"\n)\nprint(search_response)\n```\n\n#### \ud83d\udcda More Examples\n\nSee the `examples/` directory for more examples and documentation, for instance on how to use Linkup\nentrypoints using asynchronous functions.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python Client SDK for the Linkup API",
    "version": "0.2.1",
    "project_urls": {
        "Documentation": "https://github.com/LinkupPlatform/linkup-python-sdk#readme",
        "Homepage": "https://github.com/LinkupPlatform/linkup-python-sdk",
        "Issue Tracker": "https://github.com/LinkupPlatform/linkup-python-sdk/issues",
        "Source Code": "https://github.com/LinkupPlatform/linkup-python-sdk"
    },
    "split_keywords": [
        "linkup",
        "api",
        "sdk",
        "client",
        "search"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f902903b9e2eba501ceb6c6b4fc57bbeddde7e8964921a05d424f5a6125cbd0",
                "md5": "cfe2d3ee323e349c849f3fc27162f374",
                "sha256": "bf50c88e659c6d9291cbd5e3e99b6a20a14c9b1eb2dc7acca763a3ae6f84b26e"
            },
            "downloads": -1,
            "filename": "linkup_sdk-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cfe2d3ee323e349c849f3fc27162f374",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7961,
            "upload_time": "2024-12-10T16:57:57",
            "upload_time_iso_8601": "2024-12-10T16:57:57.314722Z",
            "url": "https://files.pythonhosted.org/packages/4f/90/2903b9e2eba501ceb6c6b4fc57bbeddde7e8964921a05d424f5a6125cbd0/linkup_sdk-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ebab06e8f2ca2f0ce255a40ee4505637536acfe83ec997cd8b61bd5cd031513",
                "md5": "3266dfd10c11f493056cd2662a1b495e",
                "sha256": "b00ba7cb0117358e975d50196501ac49b247509fd236121e40abe40e6a2a3e9a"
            },
            "downloads": -1,
            "filename": "linkup_sdk-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3266dfd10c11f493056cd2662a1b495e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 8918,
            "upload_time": "2024-12-10T16:57:58",
            "upload_time_iso_8601": "2024-12-10T16:57:58.459488Z",
            "url": "https://files.pythonhosted.org/packages/2e/ba/b06e8f2ca2f0ce255a40ee4505637536acfe83ec997cd8b61bd5cd031513/linkup_sdk-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 16:57:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LinkupPlatform",
    "github_project": "linkup-python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "linkup-sdk"
}
        
Elapsed time: 0.39190s