Skip to main content

pyxbox

介绍

万能工具库集合

架构图

tools.png

软件架构功能模块

1. 邮件发送模块 (mail.py)

应用场景

自动化发送业务通知、用户注册验证、密码重置等邮件。

场景描述

  • 用户注册后,发送带有验证链接的欢迎邮件。
  • 用户请求密码重置时,发送带有重置链接的邮件。
  • 定期向用户发送业务更新或促销信息。

2. 媒体处理模块 (media.py)

应用场景

处理视频和图片文件,如格式转换、下载等。

场景描述

  • 将用户上传的视频文件转换为指定格式并保存。
  • 下载网络上的图片或视频资源供进一步处理或备份。
  • 将图片资源转换为Base64编码,用于Web页面的内联显示。

3. 用户代理模块 (user_agent.py)

应用场景

模拟不同的浏览器访问,防止被网站识别为爬虫。

场景描述

  • 在进行网页爬取时,随机更换用户代理,降低被封IP的风险。
  • 进行浏览器兼容性测试,确保Web应用在不同环境下正常工作。

4. 代理配置模块 (proxies.py)

应用场景

配置和管理网络代理,访问受地域限制或需要匿名访问的资源。

场景描述

  • 访问某些只对特定国家或地区开放的在线服务。
  • 在进行网络爬虫开发时,使用代理池减少被封禁的风险。

5. 工具模块 (tools.py)

应用场景

提供多样化的工具函数,以支持日常开发中的文件操作、网络请求、日期时间处理等。

场景描述

  • 开发Web应用时,创建静态资源服务器以快速测试前端资源。
  • 在自动化脚本中,检查文件是否存在,或获取文件的最后修改时间。
  • 需要进行日期时间的转换,如将时间戳转换为可读的日期格式。

6. 微博工具模块 (weibo_utils.py)

应用场景

处理微博相关的数据,如用户ID和MID的转换。

场景描述

  • 在微博数据分析或爬虫项目中,将微博用户ID转换为MID,或反之,以适应不同的数据源格式。
  • 对微博链接进行解析,提取用户ID或MID,用于用户信息的获取或分析。

安装教程

  1. 安装:pip install pyxbox
  2. 更新:pip install -U pyxbox
  3. 卸载:pip uninstall pyxbox

使用说明

新增功能

0.0.5

  • 新增b站bv和av的转码
  • 获取弹幕字节流的转码

0.1.4

更新时间为:2023年8月17日

  • 新增微博的帖子id与mid相互转换

Metadata

Release files for pyxbox 0.1.8

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

Source distribution (sdist)

Source distribution for pyxbox 0.1.8
File Size Uploaded
pyxbox-0.1.8.tar.gz 38.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyxbox 0.1.8
File Interpreter ABI Platform
pyxbox-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 117.3 kB

Release files / pyxbox-0.1.8.tar.gz

Download URL pyxbox-0.1.8.tar.gz
Size 38.1 kB
Tags Source
SHA-256 checksum
How to use checksums
615625e9f8d7cc68b0dd4acc6db190eb9029d1f4484f2dc0b6baf9908c930980
BLAKE2b-256 checksum
How to use checksums
dd8b0ceb3bb298638743a22a04875317ab81b77676e1bf17d0da91b3b502f6f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.8.16

Release files / pyxbox-0.1.8-py3-none-any.whl

Download URL pyxbox-0.1.8-py3-none-any.whl
Size 79.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5f4c219ff41cc5d80a87012a0a4c4e4472b2dcfa09b5729a40c7872cab07f32
BLAKE2b-256 checksum
How to use checksums
d348e8d72a931177438141509a9c05b6d2c6fb6f7157faa7aef794b86f3ff737
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.8.16

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

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