BSD Ports

devel/py-confuse 2.2.1 FreeBSD

Painless YAML config files

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
Last update
Commit
4763c62370
License
MIT
Categories
devel, python
Package size
57.3 KiB, 307.2 KiB installed

Description

Confuse is a configuration library for Python that uses YAML. It takes care of defaults, overrides, type checking, command-line integration, environment variable support, human-readable errors, and standard OS-specific locations.

Here is what Confuse brings to the table:

  • An utterly sensible API resembling dictionary-and-list structures but providing transparent validation without lots of boilerplate code. Type config['num_goats'].get(int) to get the configured number of goats and ensure that it is an integer.
  • Combine configuration data from multiple sources. Using layering, Confuse allows user-specific configuration to seamlessly override system-wide configuration, which in turn overrides built-in defaults. An in-package config_default.yaml can be used to provide bottom-layer defaults using the same syntax that users will see. A runtime overlay allows the program to programmatically override and add configuration values.
  • Look for configuration files in platform-specific paths. Like $XDG_CONFIG_HOME or ~/.config on Unix; "Application Support" on macOS; %APPDATA% on Windows. Your program gets its own directory, which you can use to store additional data. You can transparently create this directory on demand if, for example, you need to initialize the configuration file on first run. And an environment variable can be used to override the directory's location.
  • Integration with command-line arguments via argparse or optparse from the standard library. Use argparse's declarative API to allow command-line options to override configured defaults.
  • Include configuration values from environment variables. Values undergo automatic type conversion, and nested dicts and lists are supported.

In the other systems

SystemPortVersion
FreeBSDdevel/py-confuse2.2.1
NetBSDdevel/py-confuse2.2.1
DragonFlydevel/py-confuse2.0.1_1

Install

Binary package:

pkg install py312-confuse

From the ports tree:

cd /usr/ports/devel/py-confuse/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	py312-confuse>0:devel/py-confuse

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest2.2.12.2.11.7.02.0.1_12.2.1
FreeBSD:14:quarterly2.2.12.2.1n/a2.0.1_12.2.1
FreeBSD:15:latest2.2.12.2.1n/a2.0.1_12.0.1_1
FreeBSD:15:quarterly2.2.12.2.1n/an/an/a
FreeBSD:16:latest2.2.12.2.1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 1

Runtime 1

The full lists below include those, and their dependencies in turn.

Build dependencies 15
Run dependencies 10
Required by 1

Configuration

No options to configure.

USES
python
Service scripts
none

Files

distinfo 1
FileSizeSHA256
confuse-2.2.1.tar.gz528378e7600c3261852122eb5f17b24b06ab8e5437b21d6224853c1420c38ac469d3c
Master sites 1
  • PYPI

Commit history 1

DateCommitCreditsLog message
4763c62370 Po-Chuan Hsieh devel/py-confuse: Update to 2.2.1
Changes: https://github.com/beetbox/confuse/releases