Skip to main content

FilerX

Universal Config Loader for Python (JSON/YAML/TOML) with Nested Keys, Merge, and File Watcher)


Overview

FilerX is a professional Python library designed for developers and DevOps engineers who need a robust, flexible, and easy-to-use configuration management tool. It supports multiple config formats (JSON, YAML, TOML), automatic format detection, nested key access, file merging, and real-time file watching.

Key Features

  • Universal Config Loader: Load JSON, YAML, or TOML files without worrying about file extensions.
  • Nested Keys & Dot Notation: Access or modify deeply nested keys easily (database.connections.0.host).
  • Merge Multiple Files: Combine multiple config files while preserving structure.
  • Auto-Detect & Auto-Fix: Automatically detect file formats and fix minor syntax issues.
  • File Watcher: Monitor files for changes and reload automatically.
  • Extensible: Add support for custom config formats.
  • Python 3.8+ compatible.

Installation

Install FilerX using pip:

pip install filerx

Or clone the repository and install locally:

git clone https://github.com/iTs-GoJo/FilerX.git
cd FilerX
pip install .

Optional extras:

pip install .[dev]
pip install .[watch]
  • dev: For development tools (pytest, black, mypy)
  • watch: Enhances file watcher capabilities with watchdog

Usage

Basic Usage

from filerx import FilerX

# Load a config file (any extension)
config = FilerX("settings.data")

# Access nested key
host = config.get("database.connections.0.host", default="localhost")
print(host)

# Set nested key
config.set("api.tokens.google", "ABC123")

# Merge another config
config.merge("extra_settings.yml")

# Save the updated config
config.save("settings_fixed.data")

Watcher Example

config = FilerX("settings.data", watch=True)
# The config will auto-reload when the file changes

Accessing Nested Arrays

servers = config.get("servers")
first_ip = config.get("servers.0.ip")
config.set("servers.1.ip", "192.168.1.2")

Dynamic Format Extension

from filerx.parser import register_format

# Example: Custom parser for a new config format
register_format("custom", lambda content: my_custom_parser(content))

Keywords

config, loader, json, yaml, toml, nested keys, merge, watcher, settings, file manager, auto-detect, auto-fix, config parser, configuration, devops, python config, config utils, dynamic config, data loader, config merger, json yaml toml, config handler, nested config, file watcher, configuration manager, python library, config editor, config automation, file parser, config toolkit


License

This project is licensed under the MIT License. See the LICENSE file for details.


Contributing

Contributions are welcome! Please submit issues or pull requests via GitHub.

  • Use dev extras for running tests and formatting: pip install .[dev]
  • Ensure all code is formatted with black and type-checked with mypy before submitting.

Contact

For questions or support, contact Ali Jafari at thealiapi@gmail.com.

GitHub: https://github.com/iTs-GoJo/FilerX

Metadata

Release files for FilerX 1.0.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 FilerX 1.0.0
File Size Uploaded
filerx-1.0.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for FilerX 1.0.0
File Interpreter ABI Platform
filerx-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / filerx-1.0.0.tar.gz

Download URL filerx-1.0.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d172b2eace1ce33c63361ddd2ced60e685c91a5dc84e2e496a62b9261f4987ed
BLAKE2b-256 checksum
How to use checksums
bb2e21e03cd6cda58f4398609767f174afaee4bf97d8c7801bae1a1d2b8a8a3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.1

Release files / filerx-1.0.0-py3-none-any.whl

Download URL filerx-1.0.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b6fa01a35c318471dc0bb484e834e3f48e896acc0ea0a1c67f912a67c352d8c
BLAKE2b-256 checksum
How to use checksums
defa4cf69863a9aafce14ed7c0e482fb7c77f20537b5f71d9a4a3d73a5dc1f46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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