Skip to main content

一些好用的函数和类

Project description

一些好用的函数和类

1.配置文件

yaml_file yaml 格式的配置文件

config.yaml

config.yaml
host: localhost
port: 123

config.xlsx
biaoge

测试代码

from l0n0lutils.files import *


config = simple_load_config(yaml_file)
print(config.get("host"))
print(config.get("port"))


config = simple_load_config(xl_file)
print(config.get(1))
print(config.get(2))
print(config.data)


config = simple_load_config(xl_kv_file)
print(config.get(1))
print(config.get(2))
print(config.data)

输出结果:

localhost
1234
{'id': 1, 'a': 'asdf', 'b': 1.2, 'c': 4}
{'id': 2, 'a': 'adsf', 'b': 2.2, 'c': 5}
{1: {'id': 1, 'a': 'asdf', 'b': 1.2, 'c': 4}, 2: {'id': 2, 'a': 'adsf', 'b': 2.2, 'c': 5}, 3: {'id': 3, 'a': 'fda', 'b': 3.2, 'c': 6}, 4: {'id': 4, 'a': 'dae', 'b': 4.2, 'c': 7}}
asdf
adsf
{'int': 'string', 1.0: 'asdf', 2.0: 'adsf', 3.0: 'fda', 4.0: 'dae'}

xl_file excel格式的配置文件

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

l0n0lutils-1.0.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

l0n0lutils-1.0.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file l0n0lutils-1.0.1.tar.gz.

File metadata

  • Download URL: l0n0lutils-1.0.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.3

File hashes

Hashes for l0n0lutils-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dd07b5247f7ca37e8e5bdb86c4c47d60ab9810430d5d93c8b01d85b88afa1e0c
MD5 75d95d7230075c661d6cf7adb0ebd525
BLAKE2b-256 d2e708faaecda7520af0c0056c0166c1c95ec01345851d3366beac1ebf15c3e6

See more details on using hashes here.

File details

Details for the file l0n0lutils-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: l0n0lutils-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.3

File hashes

Hashes for l0n0lutils-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e5eedd1730de2c38325ddc595b69b741b87f23d6339d8b367b8c4268622d5b9
MD5 2a2deb5e6eb36fdfc9b81aec703eb949
BLAKE2b-256 8cad0c60a582f50d391762db84e52475cf22df7bfb77a59985e3cb8fa4301ea4

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