Skip to main content

A simple configuration module

Project description

ConfigureOut

ConfigureOut is a lightweight Python module designed to simplify the process of loading and accessing configuration data from JSON files. It provides a simple and intuitive interface for managing configuration settings within your Python applications.

Features

  • Easy Configuration Loading: ConfigureOut allows you to load configuration settings from JSON files with just a few lines of code.
  • Nested Configuration Support: Easily access nested configuration settings using dot notation.
  • Flexible and Extensible: The module can be easily extended to suit your specific needs, allowing for customization and flexibility.
  • Pythonic Interface: ConfigureOut provides a Pythonic interface for accessing configuration settings, making it easy to integrate into your projects.

Installation

You can install ConfigureOut via pip:

pip install configureout

Usage

from configureout import Config

# Load configuration from a JSON file
config = Config("config.json")

# Access configuration settings
print(config.setting_name)
print(config.section.subsection.another_setting)

Example

Consider the following JSON configuration file ('config.json'):

{
  "database": {
    "host": "localhost",
    "port": 5432,
    "username": "user",
    "password": "password"
  },
  "logging": {
    "level": "info",
    "file_path": "/var/log/app.log"
  }
}

With ConfigureOut, you can easily load and access these settings in your Python code:

from configureout import Config

config = Config("config.json")

# Access database host
print(config.database.host)

# Access logging level
print(config.logging.level)

License

This project is licensed under the MIT License

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

configureout-1.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

configureout-1.0-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file configureout-1.0.tar.gz.

File metadata

  • Download URL: configureout-1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for configureout-1.0.tar.gz
Algorithm Hash digest
SHA256 018b725e9266939281fc4497a119a3253eeb06e03ad6a3b9db147ecb20d4936e
MD5 ca769df3cdf3425a4e4b700ceb428006
BLAKE2b-256 8d089a64625beb06883fd766c0ce656a8782a37f23eff3408ed99ad0deb97083

See more details on using hashes here.

File details

Details for the file configureout-1.0-py3-none-any.whl.

File metadata

  • Download URL: configureout-1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for configureout-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 425034215ba2243e1256567299a03099bc65b52fadb95218eeadfec5a9758a2a
MD5 cb236f0b56b23d09b7af9770f92bbbe8
BLAKE2b-256 8e0c3b5bb99c9096d4a4eb8359976148ede3683fc8e49a0ad4d858e07b2c744a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page