A simple module allows you to quickly create and modify a configuration file. Based on 'configparser'.
Project description
A simple shell allows you to quickly save and then load settings or any other project data, based on the "configparser" module. Allows you to save variable types and also supports "datetime".
Examples
Import:
>>> import uniconf
Create an instance:
>>> config = uniconf.Config()
Review:
>>> config.struct()
[info]
name:{str}
number:{int}
Сreate and edit:
>>> a = 123
>>> config.set("info_2", "number", a)
>>> config.struct()
[info]
name:{str}
number:{int}
[info_2]
number:{int}
Get:
>>> config.get("info_2", "number")
123
>>> config("info_2", "number")
123
>>> type(config("info_2", "number"))
<class 'int'>
Delete:
>>> config.delete("info", "name")
>>> config.struct()
[info]
number:{int}
[info_2]
number:{int}
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
UniConf-0.1.3.tar.gz
(4.0 kB
view details)
File details
Details for the file UniConf-0.1.3.tar.gz.
File metadata
- Download URL: UniConf-0.1.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5f7513bc29630caedfe5e0187913e07f169a97dfb5a763b2883143ee74d632f
|
|
| MD5 |
11f1cb30e9127a43c7bb07833dc37964
|
|
| BLAKE2b-256 |
f0731ec2757d5376275eba785caf04eb7db1ca52ffff8b117840094c75c41a64
|