比pip快100倍的Python包安装工具

本书作者:测试开发刚哥,文章版权归个人所有,未经授权请勿转载。 简介 uv是一款开源的Python包安装工具,GitHub star高达56k,以性能极快著称,具有以下特性(官方英文原文): 🚀 A single tool to replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more. ⚡️ 10-100x faster than pip. 🗂️ Provides comprehensive project management, with a universal lockfile. ❇️ Runs scripts, with support for inline dependency metadata. 🐍 Installs and manages Python versions. 🛠️ Runs and installs tools published as Python packages. 🔩 Includes a pip-compatible interface for a performance boost with a familiar CLI. 🏢 Supports Cargo-style workspaces for scalable projects. 💾 Disk-space efficient, with a global cache for dependency deduplication. ⏬ Installable without Rust or Python via curl or pip. 🖥️ Supports macOS, Linux, and Windows. 在Python MCP SDK的介绍中,也出现了We recommend using uv to manage your Python projects的字样,说明uv已经是一款实用性极强的工具。 ...

fastjson知多少

本书作者:测试开发刚哥,文章版权归个人所有,未经授权请勿转载。 fastjson介绍 fastjson是一个Java库,用来在Java对象和JSON之间相互转换。 fastjson的目标(官方原话): 我翻译一下: 性能非常好; 封装非常高; 转换非常强; 泛型也支持; 自定义表示; 复杂也支持; 这6个目标,书读少的我理解起来费劲,看着这些字,视线开始模糊…突然这些字动了,不断变幻,凝聚成了两个字:“牛逼”。阿里巴巴也确实做到了,fastjson(24.9k star)作为国产原创库,PK掉了jackson(7.6k star)和gson(21.3k star),在国内应用领域坐上了头把交椅。 安装fastsjon Maven引入: <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>VERSION_CODE</version> </dependency> 版本可以在 https://mvnrepository.com/artifact/com.alibaba/fastjson 查找: 虽然2.0.x版本出来了,但是使用得多的还是1.2.x版本。至少得1.2.48以上,因为这以下的版本之前出过轰动全国的安全漏洞。 入门示例 Group.java public class Group { private Long id; private String name; private List<User> users = new ArrayList<User>(); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List<User> getUsers() { return users; } public void setUsers(List<User> users) { this.users = users; } public void addUser(User user) { users.add(user); } } User.java ...

2026-01-19 · 2 分钟 · 261 字 · 测试开发刚哥 · Java生态 · #Java · #库