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.2.tar.gz (2.3 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.2-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for configureout-1.2.tar.gz
Algorithm Hash digest
SHA256 38d0d460031a95c1bbb43e03b927d22ab21eac3279c20b5a005cc062a7712fbd
MD5 b2e864d110bd825b99f830eb8e549c39
BLAKE2b-256 47ac20768d5ea2611ff862d3f4a252f919dfee1d33dbf15db2ddeb5e3dceab91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: configureout-1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0896ad91a24a84424118cbd0c49028e18d69c6aca4d4dfa0e8fa61f433531d74
MD5 5f53d311911322f372dc084c68cf4326
BLAKE2b-256 346c4d6da64eed727be08bd887929e6bc2fc28ccdde69d524b92399ff0f880d3

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