Skip to main content

usepy

Project description

logo

usepy是一个简单易用的Python工具库,包含了一些常用的工具函数。

Test Downloads Package version Supported Python versions

安装

pip install usepy -U

示例及文档

官方文档

演示

  • useAdDict
from usepy import useAdDict

d = useAdDict(
    {'a': 1, 'b': 2, 'c': {'d': 3, 'e': 4}}
)
assert d.a == 1
assert d.c.e == 4
  • useBloomFilter
from redis import Redis
from usepy import useBloomFilter

rds = Redis(host='localhost', port=6379, db=0)
bf = useBloomFilter(client=rds)
bf.add('hi', 'miclon')
assert bf.exists('hi') is True
assert bf.exists('miclon') is True
assert bf.exists('python') is False

还有一些集成工具

  • useNotify(消息通知)
from usepy.integrations.useNotify import useNotify, useChannels

notify = useNotify()
notify.add(
    useChannels.Bark({"token": "jtgTe6****yj6DaepQ"}),
)

notify.publish(content="usepy")

更多参阅官方文档

贡献

欢迎提交PR,一起完善这个工具库。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

usepy-0.2.7.tar.gz (72.4 kB view hashes)

Uploaded Source

Built Distribution

usepy-0.2.7-py3-none-any.whl (88.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page