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
| System | Port | Version |
|---|---|---|
| FreeBSD | devel/py-confuse | 2.2.1 |
| NetBSD | devel/py-confuse | 2.2.1 |
| DragonFly | devel/py-confuse | 2.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.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 2.2.1 | 2.2.1 | 1.7.0 | 2.0.1_1 | 2.2.1 |
| FreeBSD:14:quarterly | 2.2.1 | 2.2.1 | n/a | 2.0.1_1 | 2.2.1 |
| FreeBSD:15:latest | 2.2.1 | 2.2.1 | n/a | 2.0.1_1 | 2.0.1_1 |
| FreeBSD:15:quarterly | 2.2.1 | 2.2.1 | n/a | n/a | n/a |
| FreeBSD:16:latest | 2.2.1 | 2.2.1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Build 1
${PYTHON_PKGNAMEPREFIX}poetry-core>=0: devel/py-poetry-core
Runtime 1
${PYTHON_PKGNAMEPREFIX}pyyaml>=0: devel/py-pyyaml
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
| File | Size | SHA256 |
|---|---|---|
| confuse-2.2.1.tar.gz | 52837 | 8e7600c3261852122eb5f17b24b06ab8e5437b21d6224853c1420c38ac469d3c |
Master sites 1
- PYPI