mips

Added abbreviations such as upypi: to mip, solving the issue that older versions of mip do not support relative directories.-为mip添加了upypi:等多种简写,解决低版本mip不支持相对目录的问题

0.0.2 iw0-wth 更新时间: 2026-03-28
安装包
本地安装
mpremote mip install https://upypi.net/pkgs/mips/0.0.2
远程安装
mip.install("https://upypi.net/pkgs/mips/0.0.2")
版本选择
README

mips

本项目package.json采用绝对地址,低版本mip可以直接下载,以此解决低版本mip不支持相对目录的问题
This project's package.json uses absolute addresses, allowing lower versions of mip to download it directly, thereby solving the issue that older versions of mip do not support relative directories.

为mip添加了upypi:等多种简写,解决低版本mip不支持相对目录的问题-Added abbreviations such as upypi: to mip, solving the issue that older versions of mip do not support relative directories.

修改自MicroPython的mip源码,在此做出了以下修改
添加了upypi:,gitee:,gitcode:三种简写
针对gitcode添加了sleep(2)的反爬机制
修改了Copying输出,添加了url
并修改出了在标准python中运行的mips_cpy.py
Modified from the MicroPython mip source code, the following changes have been made:
Added three abbreviations: upypi:, gitee:, gitcode:
Added a sleep(2) anti-crawling mechanism for gitcode
Modified the Copying output, added the URL
And modified to create mips_cpy.py that runs in standard Python

本项目基于新版本mip源码,有效解决了低版本mip不支持相对目录的问题-This project is based on the new version of mip source code, effectively solving the issue that older versions of mip do not support relative directories.

Files

  1. mips.py
  2. mips_cpy.py

mips_cpy

本文件有以下机制:
下载时,将会在当前目录查询lib或者Lib文件夹(lib优先级高于Lib)
当没有找到lib或者Lib文件夹时,将会保存到当前目录

This file has the following mechanisms:
When downloading, it will search for the lib or Lib folder in the current directory (lib has higher priority than Lib).
When no lib or Lib folder is found, it will be saved to the current directory.

upypi:

upypi:<package_name>/<version>/<file>->https://upypi.net/pkgs/<package_name>/<version>/<file>
upypi:<package_name>/<file>->https://upypi.net/pkgs/<package_name>/<branch>/<file>

demo

mips.install("upypi:microflask",version="0.0.20260324",debug=True)
mips.install("upypi:microflask/src/microflask.py",target="/",version="0.0.20260324",debug=True)
mips.install("upypi:microflask_async/0.0.20260324")

gitee:/gitcode:

The usage method is the same as "github:"
使用方式同"github:"

demo

mips.install("gitee:wth_iw0/microflask")
mips.install("gitee:wth_iw0/microflask",version="main")
mip.install("gitcode:wth_iw0/microdns",mpy=False,version="master")

custom

You can add a shortcut by modifying "_rewrite_url()"
You can develop more conveniently by using "install(debug=True)" and "_rewrite_url(debug=True)"

demo

import mips
mips.install("gitcode:wth_iw0/microflask")
mips.install("gitee:wth_iw0/microflask",version="main")
mips.install("upypi:utemplate/1.4.1")
mips.install("http://upypi.net/pkgs/microflask_async/0.0.20260321/package.json")
mips.install("upypi:microflask",version="0.0.20260324",debug=True)
mips.install("upypi:microflask/src/microflask.py",target="/",version="0.0.20260324",debug=True)
mips.install("upypi:microflask_async/0.0.20260324")

0.0.2

优化了upypi:简写的模式,现在可以通过mips.install("<package_name>",version="<version>")下载https://upypi.net/pkgs/<package_name>/<version>/
依然支持mips.install("<package_name>/<version>")
添加了debug模式
Optimized the upypi:abbreviation pattern. Now, you can download via mips.install("<package_name>", version="<version>").
The pattern mips.install("<package_name>/<version>")is still supported.
A debug mode has been added.

许可证

MIT License

支持

如有问题请提交 Issue 或联系开发团队。

联系

EMAIL:tianqi2021_001@163.com

文件列表
Name Size Type
README.md 3.8KB Doc
mips.py 7.4KB Python
mips_cpy.py 8.8KB Python
package.json 513B Conf