Skip to main content

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.

Project description

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:

Parameter Type Default Description
email str - Email for logging into DeepSeek
password str - Password for logging into DeepSeek
chat_id Optional[str] None ID of a specific chat session
headless bool True Launch browser in headless mode
verbose bool False Enable detailed logging
chrome_args Optional[List] None Additional arguments for Chrome
attempt_cf_bypass bool True Attempt to bypass Cloudflare protection

Sending Messages

The send_message method accepts:

Parameter Type Default Description
message str - Message text to send
slow_mode bool False Send the message slowly, character by character
deepthink bool False Activate DeepThink feature
search bool False Activate search feature
timeout int 60 Maximum response waiting time
slow_mode_delay float 0.25 Delay 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openseek-0.1.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openseek-0.1.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file openseek-0.1.2.tar.gz.

File metadata

  • Download URL: openseek-0.1.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.10.11 Windows/10

File hashes

Hashes for openseek-0.1.2.tar.gz
Algorithm Hash digest
SHA256 50c7142fa408797a7f74a25471626553a5428a12325b78e43a8f29dd60ce2d5b
MD5 ca3bdc261b9b25ddedbc9bf974a21d56
BLAKE2b-256 253cffa0be26ae835dbfb5292d2da60dbf3484f27115ea1f94179e6f43f6a7f6

See more details on using hashes here.

File details

Details for the file openseek-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: openseek-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.10.11 Windows/10

File hashes

Hashes for openseek-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 451051d6d9264f1bd56c06846b1cd162c90a2fecd5db4bd8647fa0f364817768
MD5 d28b8ab3b37582fa3832bf19dc40f09a
BLAKE2b-256 f9dc7012f7cb13a7ca92a548e0fc755ca912ef0247a7f25e6ddf3c25f0866aff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page