Skip to main content

common tool library for silvaq

silvaq-pylib

我自己常用的功能封装起来,方便自己日常使用

  • version 0.1.5 :
    • 新增了日期常规方法

工具库

  1. file 文件相关
  2. dir 目录相关
  3. time 日期、时间相关
  4. mail 发送邮件相关
  5. logger 日志相关

安装

pip3 install silvaq-pylib

更新

pip3 install  --upgrade silvaq-pylib

使用

from silvaq_libs import file as silva_file
from silvaq_libs import dir as silva_dir
from silvaq_libs.mail import Server as SilvaMailServer
from silvaq_libs.logger  import Logger as SilvaLogger

if __name__ == '__main__':

    # for files
    silva_file.exist("/tmp/test.txt")

    #for dir 
    silva_dir.maketree("a/b/c/d")

    # for mail
    params_dict = {
        'host': "server_host",
        'sender': "sender",
        'password': "password",
        'username': 'username',
        'port': 25,
    }
    to="somebody"
    sub="somesub"
    con="somecon"
    SilvaMailServer(**params_dict).send_mail(to,sub,con)

    #for logger
    logger = SilvaLogger("log_path","log_file_prefix","log_file_suffix","halder_container_cap")
    logger.log("some con")
    logger.log("some con again")
    # ... more log here
    # notice  目前所有配置都是默认项,所以日志是实时写入的,如果有需求想用缓冲请自行查阅并修改创建hander时open 的buffer
    # todo 这一项将提供可选方法
    logger.commit() 

Metadata

Release files for silvaq-lib 0.1.5

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

Source distribution (sdist)

Source distribution for silvaq-lib 0.1.5
File Size Uploaded Provenance
silvaq-lib-0.1.5.tar.gz 8.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for silvaq-lib 0.1.5
File Interpreter ABI Platform
silvaq_lib-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / silvaq-lib-0.1.5.tar.gz

Download URL silvaq-lib-0.1.5.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a475241b56d78df0e477cfb9779b4f0773b8c875f22cc28e7cf0019410ecd719
BLAKE2b-256 checksum
How to use checksums
963f612f9d193a8012faef0a2287f6769883f72b403a2c77c8fa75c17698a918
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.11.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

Release files / silvaq_lib-0.1.5-py3-none-any.whl

Download URL silvaq_lib-0.1.5-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dee627161385304f31124a82173ca44f744b1bd2a0bdc146b833d2b6ff4eed9
BLAKE2b-256 checksum
How to use checksums
1a23965726bbb7f129405ba1ea96c3f8f6c5fe577168f0c15859d66bbb22b436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.11.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

Security for silvaq-lib 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files No provenance

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