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"

Metadata

Release files for cuspy 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cuspy 0.1.3
File Size Uploaded Provenance Actions
cuspy-0.1.3.tar.gz 3.1 kB Without provenance Details for cuspy-0.1.3.tar.gz

Release files / cuspy-0.1.3.tar.gz

Download URL cuspy-0.1.3.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
612dede6a087868a10f1510ca3c50ed48185ec2511d99d5b9bbaf30651899db2
BLAKE2b-256 checksum
How to use checksums
7159dd4527f46a65ca4fe3e2d810cb44f7ae9354cc52219de2a30ab4c729832e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Security for cuspy 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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