Config Utils for Python
Project description
Config for Python
1. Introduction
Parse config from json file
2. Usage
2.1 Basic
- config.json
{
"a": 1,
"b": 2
}
- python file
from cuspy import ConfigUtils
config = ConfigUtils("config.json")
a = config.aaa_config.a
b = config.aaa_config.b
2.2 File/Directory Path
- config.json
{
"aaa_config": {
"root": "/home/aaa",
"data_dn": "data_dir",
"data_fp": "data.tsv"
}
}
- python file
from cuspy import ConfigUtils
config = ConfigUtils("config.json")
data_dp = config.aaa_config.data_dp
# data_dp = "/home/aaa/data_dir"
data_fp = config.aaa_config.data_fp
# data_fp = "/home/aaa/data_dir/data.tsv"
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
cuspy-0.1.2.tar.gz
(3.1 kB
view details)
File details
Details for the file cuspy-0.1.2.tar.gz.
File metadata
- Download URL: cuspy-0.1.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06340ffd4d9599ed8ab5e52cc8fc56d1a34682a48fa305004fd54bd2756c4e4e
|
|
| MD5 |
45558913426b964fa05063e8d83f106b
|
|
| BLAKE2b-256 |
9a76288242cd1d5577f125240e2b23050003118fffa7a3b97659a1b10a43d830
|