Skip to main content

basic-config-loader

Load a JSON configuration from a file, or from multiple folders on the filesystem.

Getting Started

Prerequisites

This project has no dependencies. Yay!

Installing

pip install basic-config-loader

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Usage

import configLoader as cl
...
CONFIG = cl.loadConfig(...)
...

:param path: the path to look for the file. It is recommended to provide the result of os.path.join() rather than a manually typed path because a certain OS which must not be named has different path conventions than everyone else.

:param default: the configuration to return if loading from the filesystem fails.

:param fromHome: if True, look from the current user's home directory. If False, look from the root directory.

:param topSearchPath: if None, only look in the specified path for the file. Otherwise, a path should be provided. 'HOME' can be filled in as a shortcut for os.environ['HOME']. The exact behavior depends on fullSearchAlways.

:param fullSearchAlways: if False, and the directory specified in path is empty, move up one folder, up to topSearchPath, until a config file is found, and use the first file found. If no file is found, use the default config. If True, start with the default configuration and apply any changes from topSearchPath to path in order.

:return: the configuration if loading was successful, or the default configuration if loading failed.

Metadata

Release files for basic-config-loader 0.2.0

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

Source distribution (sdist)

Source distribution for basic-config-loader 0.2.0
File Size Uploaded Provenance Actions
basic-config-loader-0.2.0.tar.gz 3.0 kB Without provenance Details for basic-config-loader-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for basic-config-loader 0.2.0
File Interpreter ABI Platform Actions
basic_config_loader-0.2.0-py3-none-any.whl Python 3 none any Details for basic_config_loader-0.2.0-py3-none-any.whl

Total release size: 10.4 kB

Release files / basic-config-loader-0.2.0.tar.gz

Download URL basic-config-loader-0.2.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4d1f939edecd9f13200e4f9fe9515bd4d4b5d93174c02728d9874c2e73e211b9
BLAKE2b-256 checksum
How to use checksums
0384de593eefc538048ed4d54a03b245827ef4efc499f7656e4f5707975a0acd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / basic_config_loader-0.2.0-py3-none-any.whl

Download URL basic_config_loader-0.2.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb58eb6074b96a9906642e84655e4a4c281fe0fb675166c4c8ffd99b6c57d130
BLAKE2b-256 checksum
How to use checksums
d1032cc08f221d83652dd54a288f005a744190acf12b44b8158949642499132f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Security for basic-config-loader 0.2.0

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