Skip to main content

操作更方便的配置文件读取模块

某ini文件
[table]
data = mydata
读取代码如下
import zinifile

ini = zinifile.load(文件名)
ini = zinifile.load_text(ini内容)
print(ini.table.data)
你可以将zinifile创建的实例当做一个字典或者迭代器.
for key in ini
for key, value in ini.items()
value = ini.get('键')
value = ini['键']

更新日志

18-11-15 1.0.4

1.空值不会再返回一个空的str了,而是返回None

2.用xx.xx如果属性不存在则返回zinifile.empty_node对象, 这个对象可以像_node一样使用, 但是获取任何数据都是空数据, 他的布尔检测为False

empty_node is None  #False
empty_node == None  #True
bool(empty_node)    #False

本项目仅供所有人学习交流使用, 禁止用于商业用途

Download files

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

Source Distribution

zinifile-1.0.4.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

zinifile-1.0.4-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file zinifile-1.0.4.tar.gz.

File metadata

  • Download URL: zinifile-1.0.4.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for zinifile-1.0.4.tar.gz
Algorithm Hash digest
SHA256 f1a287b79360b6a90786528515bd382bef9a832b33671d78c8758d1d49b19282
MD5 504a850cc1bd44ac0f42b63d1b043e05
BLAKE2b-256 03f3979fe71f4330f32674dce84828e73e6b51c38268184a446eedcca04d5f39

See more details on using hashes here.

File details

Details for the file zinifile-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: zinifile-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for zinifile-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9b74e9cadab6170a30a9e59a8f274d676d68e306b4d7119562a4142a8ca59ab4
MD5 2b30f2d1b3b27fecda1f86bb0f7832d0
BLAKE2b-256 6d703edde02ffa28583725910d21c1f8119558a783fe743896ec94b591bfa4f6

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 files

1.0.3

2 files

1.0.2

2 files

Supported by

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