Skip to main content

Pancake Embed

零 import 插件 — 配合 DoughMeta 实现框架 API 自动注入

工作原理

  1. Embed 插件加载时(init_order=-10,最先执行),将装饰器注册到 muffin_flour
  2. 用户定义 Dough 子类时,DoughMeta 自动从 muffin_flour/muffin_water 注入已注册的名称到模块命名空间
  3. 用户代码无需 import 即可使用所有装饰器和基类
from pancake.dough import Dough

# 定义子类后,Singleton、Service、DoughFactory 等自动可用
@Singleton
class UserService(Service):
    async def on_init(self):
        self.db = DoughFactory.get().resolve("DatabaseService")

注册的名称

装饰器 (muffin_flour)

  • @Singleton / @Prototype / @Lazy — 作用域
  • @DoughDecorator — 标记类为 Bean
  • @DependsOn("A", "B") — 声明依赖
  • @Import(Cls) — 自动注册外部类
  • @Maker / @noMaker — 控制方法 Bean 注册
  • @inject — 自动注入依赖
  • @Config — 从配置注入字段

基类 (muffin_water)

  • Configuration — 配置类
  • Service — 服务类
  • Function — 方法类
  • Struct — 数据结构类
  • DoughFactory — Bean 工厂

安装

pip install pancake-embed

或在 pancake.xml 中添加:

<dependency>
    <groupId>io.pancake</groupId>
    <artifactId>embed</artifactId>
</dependency>

开源协议

MIT

Metadata

Release files for pancake-embed 0.1.2

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

Source distribution (sdist)

Source distribution for pancake-embed 0.1.2
File Size Uploaded Provenance Actions
pancake_embed-0.1.2.tar.gz 2.5 kB With provenance Details for pancake_embed-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pancake-embed 0.1.2
File Interpreter ABI Platform Actions
pancake_embed-0.1.2-py3-none-any.whl Python 3 none any Details for pancake_embed-0.1.2-py3-none-any.whl

Total release size: 5.9 kB

Release files / pancake_embed-0.1.2.tar.gz

Download URL pancake_embed-0.1.2.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
342cc7a57317559a193fee6d11e9950173ba8cad9fd6d5b0d5d2f08fa9b714ee
BLAKE2b-256 checksum
How to use checksums
892b1e5da3612b2b9bdfc2d07b40b055a6b2c058f81bfa76ed302e78debeed43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.

Transparency log

Release files / pancake_embed-0.1.2-py3-none-any.whl

Download URL pancake_embed-0.1.2-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1905ba52f37a1828de154fc8bc2ef467356e4bb0cf932ccb861e43427752b4f
BLAKE2b-256 checksum
How to use checksums
ae6ad9492748b655fa569bc862a3f5e5aaf973e3bdc0256f29455c0bcb593783
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.

Transparency log

Security for pancake-embed 0.1.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pancake_embed-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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