Skip to main content

deepseek-recipe-python

Python bindings for deepseek-recipe: conversion of Messages, Chat Completions, and Responses requests, rendering of DeepSeek V4/V4.1 conversations into prompts, encoding of conversations into token IDs with an attached tokenizer, image preprocessing, and response streaming. The caller must provide model inference, tool execution, and HTTP transport.

Installation

Python 3.10 or later:

python3 -m pip install deepseek-recipe

Import as deepseek_recipe. Source builds require Rust, OpenCV 4.x, and Clang/libclang.

Example

from deepseek_recipe import ChatCompletionRequest, ConversionOptions, DeepseekV41Encoding

request = ChatCompletionRequest({
    "model": "DeepSeek-V4.1-Flash",
    "messages": [{"role": "user", "content": "Hello"}],
})
converted = request.convert(ConversionOptions())
rendered = DeepseekV41Encoding().render_conversation(converted.conversation)
print(rendered.prompt)

License

MIT. The distribution includes the license text.

Metadata

Release files for deepseek-recipe 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deepseek-recipe 0.2.0
File Size Uploaded Provenance
deepseek_recipe-0.2.0.tar.gz 249.2 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for deepseek-recipe 0.2.0
File
deepseek_recipe-0.2.0-cp310-abi3-manylinux_2_39_riscv64.whl CPython 3.10 abi3 Linux glibc 2.39+ RISC-V 64 Details
deepseek_recipe-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details
deepseek_recipe-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details
deepseek_recipe-0.2.0-cp310-abi3-macosx_11_0_x86_64.whl CPython 3.10 abi3 macOS 11.0+ x86-64 Details
deepseek_recipe-0.2.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details

Total release size: 54.8 MB

Release files / deepseek_recipe-0.2.0.tar.gz

Download URL deepseek_recipe-0.2.0.tar.gz
Size 249.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5dfd65dc201004f6382b13c8432a406cd2af7188831944ac5cef22f260111f68
BLAKE2b-256 checksum
How to use checksums
869d0b86feb9f32d35ff93f9404fb797a4ab40eb6d9616f87ed5c5b3613e26d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / deepseek_recipe-0.2.0-cp310-abi3-manylinux_2_39_riscv64.whl

Download URL deepseek_recipe-0.2.0-cp310-abi3-manylinux_2_39_riscv64.whl
Size 10.6 MB
Tags CPython 3.10 Linux glibc 2.39+ RISC-V 64 abi3
SHA-256 checksum
How to use checksums
622e222aa6290be1bea38f021549a05eddb0c84096663e5424acff0a9d528c9d
BLAKE2b-256 checksum
How to use checksums
21e85b30c76e4f17ab2bf2c1d8abeff28cf41f62e8bd8571b6eee45c074db251
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / deepseek_recipe-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL deepseek_recipe-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl
Size 12.8 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
259812bf382bc82668b672707c5922095cc4f5f60a6c514ff89640bb62a746f7
BLAKE2b-256 checksum
How to use checksums
f550bfc176a196e438509e5821b9b5e668d866ccc791aefc01fa1119e857d8e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / deepseek_recipe-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL deepseek_recipe-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 11.4 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
7c31fa6ed6ff8319670fa6efdf682e724f4e78f76218f6d08dfc4c0d6f47a071
BLAKE2b-256 checksum
How to use checksums
135756cbc6d4084460ed5866804c775c9cff7919e2567c71a5e3e0bc8cc2fabd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / deepseek_recipe-0.2.0-cp310-abi3-macosx_11_0_x86_64.whl

Download URL deepseek_recipe-0.2.0-cp310-abi3-macosx_11_0_x86_64.whl
Size 10.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
fb0d02291c43ef1ab10c2abcb7191e8326a71ea3e76cd01c6b2e79b75e6ce73f
BLAKE2b-256 checksum
How to use checksums
05bb70c92b4d9672130a52783a0b9b496ff7cedf0360d40bf2a3da1cbf8f7800
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / deepseek_recipe-0.2.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL deepseek_recipe-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Size 9.5 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
624bb4d0fb3ed541b9e34d2ef96ff66057026ded7d6708b0b9088cc6d6723999
BLAKE2b-256 checksum
How to use checksums
6704c9c4dda8c4c9a004a356888c68543458237b07b72431edc7e33e0cab740b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for deepseek-recipe 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2.0 This release

6 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page