Skip to main content

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"

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.3.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file cuspy-0.1.3.tar.gz.

File metadata

  • Download URL: cuspy-0.1.3.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

Hashes for cuspy-0.1.3.tar.gz
Algorithm Hash digest
SHA256 612dede6a087868a10f1510ca3c50ed48185ec2511d99d5b9bbaf30651899db2
MD5 372db5657a365724fefb071c3172ab37
BLAKE2b-256 7159dd4527f46a65ca4fe3e2d810cb44f7ae9354cc52219de2a30ab4c729832e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page