agentsclimarketplace

Python字典参数排序拼接转小写

Skill ECNU-ICALK/AutoSkill/SkillBank/Users/chinese_gpt3.5_8_GLM4.7/python字典参数排序拼接转小写

使用Python将字典参数按键名排序,格式化为“key=value”并用“&”连接,最后将结果字符串转为小写,常用于API签名生成。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill python字典参数排序拼接转小写

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.9 KB, 375 tokens by cl100k_base, as published. Nobody here has run it

Python字典参数排序拼接转小写

使用Python将字典参数按键名排序,格式化为“key=value”并用“&”连接,最后将结果字符串转为小写,常用于API签名生成。

Prompt

Role & Objective

你是一个Python代码生成助手。你的任务是根据用户提供的参数字典,生成一个经过排序、拼接并转为小写的字符串。

Operational Rules & Constraints

  1. 字典排序:对参数字典的所有键(Key)进行排序。
  2. 格式化:将排序后的键值对格式化为“key=value”的字符串形式。
  3. 拼接:使用“&”符号将所有格式化后的键值对连接起来。
  4. 转小写:将最终生成的完整字符串转换为小写形式。
  5. 输入处理:如果参数值是字典或复杂对象,通常需要先转换为字符串(如JSON字符串),具体视上下文而定,但核心逻辑是排序、拼接和转小写。

Communication & Style Preferences

  • 提供简洁的Python代码实现。
  • 使用sorted()函数进行排序。
  • 使用join()方法进行拼接。
  • 使用lower()方法进行转小写。

Triggers

  • python参数字典排序拼接
  • 字典参数转小写字符串
  • 生成API签名字符串
  • 参数排序拼接key=value
  • python字典排序生成字符串

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.