πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
Sign inDemoInstall
Socket

openseek

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openseek

OpenSeek is an open-source Python library that provides seamless, cost-free access to DeepSeek models. Designed for developers and researchers, it offers a simple and unified interface to interact with various DeepSeek LLMs without requiring API keys, subscriptions, or paid plans.

0.1.4
PyPI
Maintainers
1

OpenSeek is an open-source Python library that provides free access to DeepSeek models. Designed for developers and researchers, it offers a simple and unified interface to interact with various DeepSeek LLM models without requiring API keys, subscriptions, or paid plans.

Installation

pip install openseek

Quick Start

Asynchronous Usage

import asyncio
from openseek import DeepSeek


async def main():
    async with DeepSeek(
            email="your_email@example.com",
            password="your_password",
            headless=True
    ) as api:
        response = await api.send_message("РасскаТи ΠΌΠ½Π΅ ΠΎ ΠΊΠ²Π°Π½Ρ‚ΠΎΠ²ΠΎΠΉ Ρ„ΠΈΠ·ΠΈΠΊΠ΅")
        print(response.text)


asyncio.run(main())

Synchronous Usage

from openseek import DeepSeek


def main():
    api = DeepSeek(
        email="your_email@example.com",
        password="your_password",
        headless=True
    )

    try:
        api.initialize_sync()
        response = api.send_message_sync("РасскаТи ΠΌΠ½Π΅ ΠΎ ΠΊΠ²Π°Π½Ρ‚ΠΎΠ²ΠΎΠΉ Ρ„ΠΈΠ·ΠΈΠΊΠ΅")
        print(response.text)
    finally:
        api.close_sync()


main()

Features

  • Free Access: Use DeepSeek models without API keys or paid subscriptions
  • Asynchronous and Synchronous API: Flexibility for different usage scenarios
  • DeepThink Mode: Activate advanced thinking features for more complex queries
  • Search Support: Enable web search to get up-to-date information
  • Session Management: Resume existing chats using a session ID

Parameters

When initializing DeepSeek, the following parameters are available:

ParameterTypeDefaultDescription
emailstr-Email for logging into DeepSeek
passwordstr-Password for logging into DeepSeek
chat_idOptional[str]NoneID of a specific chat session
headlessboolTrueLaunch browser in headless mode
verboseboolFalseEnable detailed logging
chrome_argsOptional[List]NoneAdditional arguments for Chrome
attempt_cf_bypassboolTrueAttempt to bypass Cloudflare protection

Sending Messages

The send_message method accepts:

ParameterTypeDefaultDescription
messagestr-Message text to send
slow_modeboolFalseSend the message slowly, character by character
deepthinkboolFalseActivate DeepThink feature
searchboolFalseActivate search feature
timeoutint60Maximum response waiting time
slow_mode_delayfloat0.25Delay between characters in slow_mode

Error Handling

The library can raise the following exceptions:

  • MissingCredentials: Missing credentials (email or password)
  • InvalidCredentials: Invalid credentials
  • ServerDown: DeepSeek server is unavailable
  • MissingInitialization: Required dependencies are missing or initialization not done

Requirements

  • Python 3.10 or higher
  • Dependencies: beautifulsoup4, zendriver, inscriptis, pyvirtualdisplay (for Linux)

License

MIT - see LICENSE for details.

Author

Daniel CuzneΕ£ov danielcuznetov04@gmail.com

Keywords

openseek

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts