xdgpspconf - XDG Platform Suited Project configuration
Project description
XDG Platform Suited Project CONFiguration
Gist
Source Code Repository
Badges
Description
- Handle platform suited xdg-base to
- Read configuration from standard locations.
- supported formats:
yaml
json
toml
conf (ini)
Write configuration to most general, writable xdg-location
- Locate standard directories:
xdg_cache
xdg_config
xdg_data
xdg_state
XDG Specification
View xdg specifications here.
What does it do
Reads standard Windows/POSIX locations, current folder and optionally all ancestors and custom locations for xdg-configuration
- Platform-specific locations:
Windows Locations: Environment Variable %LOCALAPPDATA%\<PROJECT> or %USERPROFILE%\AppData\Local\<PROJECT>
POSIX [Linux/MacOS] Locations: Environment Variable $XDG_CONFIG_HOME/<PROJECT> or $HOME/.config/<PROJECT>
Environment-declared variable: %<PROJECT>RC% for Windows or $<PROJECT> for POSIX
Custom configuration path: supplied in function
Relative path: $PWD/.<PROJECT>rc
Ancestors: Any of the parents, till project root or mountpoint, that contains __init__.py, where,
project root is the directory that contains setup.cfg or setup.py
mountpoint is checked using pathlib.Path.drive on windows or pathlib.Path.is_mount() on POSIX
Lists possible xdg-locations (existing and prospective)
XDG_CACHE_HOME is supported for cache locations
XDG_CONFIG_HOME, XDG_CONFIG_DIRS are supported for configuration locations
XDG_DATA_HOME, XDG_DATA_DIRS are supported for data locations
XDG_STATE_HOME, XDG_STATE_DIRS are supported for state locations
TODO
- Implementation for following variables:
XDG_RUNTIME_DIR
Other XDG specifications.
Arbitrarily defined XDG_.* environment variables
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for xdgpspconf-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4008e350609ef6ea20a2b9947a1ef24e1c8255085c72fcc7d4fb295577d4a263 |
|
MD5 | d5881b7d7c2738e46a3e93ec4d80c32f |
|
BLAKE2b-256 | 36bb59b4550b6ec9e3a91bdbc39d438d9a6e949aecddacca060a7c8678488fe2 |