Pancake Embed Plugin - 零 import 机制,通过 Dough 生命周期自动注入 builtins
Project description
Pancake Embed
零 import 插件 — 配合 DoughMeta 实现框架 API 自动注入
工作原理
- Embed 插件加载时(
init_order=-10,最先执行),将装饰器注册到muffin_flour - 用户定义
Dough子类时,DoughMeta 自动从muffin_flour/muffin_water注入已注册的名称到模块命名空间 - 用户代码无需
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pancake_embed-0.1.1.tar.gz.
File metadata
- Download URL: pancake_embed-0.1.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55a192295feece39eac1f281bbe2663e807ae492df81bb628698a6f73afe86e4
|
|
| MD5 |
8119630f06142303970fd4684650b7d4
|
|
| BLAKE2b-256 |
1f899f2585b208bbbd652ca093ad37d25edbc519c7dbfb465c04f89b88d500cb
|
Provenance
The following attestation bundles were made for pancake_embed-0.1.1.tar.gz:
Publisher:
publish.yml on PancakeFramework/Pancake-Embed
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pancake_embed-0.1.1.tar.gz -
Subject digest:
55a192295feece39eac1f281bbe2663e807ae492df81bb628698a6f73afe86e4 - Sigstore transparency entry: 1744452957
- Sigstore integration time:
-
Permalink:
PancakeFramework/Pancake-Embed@7dab34cd056e9a35a02a41301de563cdfa909e10 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PancakeFramework
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7dab34cd056e9a35a02a41301de563cdfa909e10 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pancake_embed-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pancake_embed-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dc2a22934bd5751198c42b26e5e893acefcd90d69efc24378c6d52b7a5cd1f3
|
|
| MD5 |
794f4624720e794caccd2e9eb16558f7
|
|
| BLAKE2b-256 |
ab01d487a05d95728aced51b455b4bb2d7dd96d5b83b486824322165643f19b8
|
Provenance
The following attestation bundles were made for pancake_embed-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on PancakeFramework/Pancake-Embed
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pancake_embed-0.1.1-py3-none-any.whl -
Subject digest:
7dc2a22934bd5751198c42b26e5e893acefcd90d69efc24378c6d52b7a5cd1f3 - Sigstore transparency entry: 1744453049
- Sigstore integration time:
-
Permalink:
PancakeFramework/Pancake-Embed@7dab34cd056e9a35a02a41301de563cdfa909e10 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PancakeFramework
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7dab34cd056e9a35a02a41301de563cdfa909e10 -
Trigger Event:
push
-
Statement type: