Skip to main content

group of tools for data process

Project description

zeroinger

提升编码效率,有效延长程序猿寿命的小工具集

目录

  • 安装
    • 依赖条件
    • pip3安装
  • 使用方法
    • 时间相关
    • Excel/CSV读写
    • 配置文件读取
    • 文本文件读写
  • 更新日志

安装

依赖条件

  • python>=3.6.0
  • logzero==1.5.0

pip3安装

pip3 install --upgrade zeroinger

使用方法

时间相关

StopWatch

from zeroinger.time.stopwatch import StopWatch
import time

timer = StopWatch.create_instance()
time.sleep(1)
print(timer.snapshot())
time.sleep(1)
print(timer.duriation())
timer.reset()
time.sleep(1)
print(timer.duriation())
pass
#--------------------------------
1000
2002
1003

Excel/CSV相关

XLSX

读取excel
from zeroinger.excel.xlsx import XLSX
test_read_file_path = os.path.join(os.path.dirname(__file__), 'read_test_file.xlsx')
data = XLSX.read_dict_sheet(test_read_file_path, 0)
print(data)
#--------------
[{'列1': 1, '列2': 4, '列3': 7}, {'列1': 2, '列2': 5, '列3': 8}, {'列1': 3, '列2': 6, '列3': 9}]
写入excel
from zeroinger.excel.xlsx import XLSX
golden = [{'列1': 1, '列2': 4, '列3': 7}, {'列1': 2, '列2': 5, '列3': 8}, {'列1': 3, '列2': 6, '列3': 9}]
test_write_file_path = os.path.join(os.path.dirname(__file__), 'write_test_file.xlsx')
XLSX.write_dict_sheet(test_write_file_path, golden)

更新日志

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

zeroinger-1.0.5.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zeroinger-1.0.5-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file zeroinger-1.0.5.tar.gz.

File metadata

  • Download URL: zeroinger-1.0.5.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for zeroinger-1.0.5.tar.gz
Algorithm Hash digest
SHA256 da903a2beb5c04667cf0a4be85b4335f2c524e17f25a6296e90af52f85759578
MD5 037809b7f586b0b2a70422b0adf8a312
BLAKE2b-256 83135b385898c915328eb0c8b87ed9e998898469946ae4c0cc0604583e27a840

See more details on using hashes here.

File details

Details for the file zeroinger-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: zeroinger-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for zeroinger-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 53ad29a5a297024e9224d1a029eeb5c90cc36c063a9b5e5d7e6448e393896749
MD5 3c6c670ee292a0807fda0b575ffa7a1c
BLAKE2b-256 a09dfe53075c09e703ecfd4bdf2cac3cca1644619853ef79ccd457e4386be317

See more details on using hashes here.

Supported by

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