一些好用的函数和类
Project description
一些好用的函数和类
1.配置文件
yaml_file yaml 格式的配置文件
config.yaml
config.yaml
host: localhost
port: 123
config.xlsx
测试代码
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
Release history Release notifications | RSS feed
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.9.tar.gz
(24.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file l0n0lutils-1.0.9.tar.gz.
File metadata
- Download URL: l0n0lutils-1.0.9.tar.gz
- Upload date:
- Size: 24.1 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41ddb47f14140debf863cce800ee0d4b335a2cf3b3452a935d74a172a55ab269
|
|
| MD5 |
8210efa062218ea4c313e40daac3da7f
|
|
| BLAKE2b-256 |
0d68da72cc5c365e863f4d5e6374c0af8c6b17810e9bc2fab1ceffece4f70177
|
File details
Details for the file l0n0lutils-1.0.9-py3-none-any.whl.
File metadata
- Download URL: l0n0lutils-1.0.9-py3-none-any.whl
- Upload date:
- Size: 17.2 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77b8b57682b5ddca92fd0c8f01f4c6726e62e8833fa168a030edbe8ccec98a74
|
|
| MD5 |
d70c72966a8d611f1891f50903f51b85
|
|
| BLAKE2b-256 |
1fb25401f7cdd99cd58acdf0b98c8070d2974d96a2f6d96d4ff58c4ee7c91d4a
|