Skip to main content

1.nb_libs 介绍

nb_libs 是 各种小功能集合,不再单独给每个功能模块创建单独的git项目

2. 安装

pip install nb_libs

不想分开分发很多个不同功能单独的包,各种小功能杂项放在一起,具体功能看代码.

3. 各模块功能介绍

3.1 auto_git

自动merge你自己的开发分支到指定的分支,节约10次git命令操作

3.2 code_line_statistics

统计代码文件和行数

3.4 github_git_clone

自动批量下载git项目,人工太累了。

3.5 global_dict

全局字典

3.6 http_utils

http url相关函数工具

3.7 lazy_importer

延迟导入,适合破解循环导入

3.8 path_helper

文件操作,强力的文件路径和import相互转化

3.9 pydantic_helper

pydantic辅助,pydantic api老是改来改去,有的在未来需要抛弃过时,直接使用官方api兼容风险很大。

3.10 restart_programe_by_interval.py

自动定时重启python自身,很强力很好用。 有时候python内存泄漏,每隔一周需要人工重启,定时重启就很好用,省去你苦逼找内存泄漏原因。

3.11 str_utils

字符串辅助,可以加密常规数据库 中间件 uri中的密码

3.12 sys_frame_uitils

sys._getframe 的封装,使得更好用,直接sys._getframe 来获取行号 函数名字 文件名 很难写, 很难记住方法名,EasyFrame类大幅简化

4 记录其他好用的三方包

icecream:

from icecream import ic

x = 1
ic(x)

Release files for nb-libs 2.0

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

Source distribution (sdist)

Source distribution for nb-libs 2.0
File Size Uploaded
nb_libs-2.0.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nb-libs 2.0
File Interpreter ABI Platform
nb_libs-2.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.8 kB

Release files / nb_libs-2.0.tar.gz

Download URL nb_libs-2.0.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2c9243373e2a5a6fb082830da817cab58e855329a25f5724fd537de4e421fb11
BLAKE2b-256 checksum
How to use checksums
6faf601225470d89e9536d3c916c5e6f218621228dfb0191cd0ea22306531de5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / nb_libs-2.0-py3-none-any.whl

Download URL nb_libs-2.0-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a237b37c86f242951064419aea17787fb096a2d6648e6fdc00826bfae6ebd43
BLAKE2b-256 checksum
How to use checksums
bc6a15c45031aef47e13cb50d9a2add31ac4818a83fb9a1a9c1baa6a8ab2d6c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release history Release notifications | RSS feed

This release

2.0 This release

2 release files

1.9

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.9

2 release files

0.8

1 release file

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

1 release file

0.2

1 release file

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