Skip to main content

xdgpspconf - XDG Platform Suited Project configuration

Project description

XDG Platform Suited Project CONFiguration

Gist

Source Code Repository

source Repository

pages Documentation

Badges

Pipeline Coverage PyPI - version PyPI - format PyPi - pyversion

Description

Handle platform suited xdg-base to
  • Read configuration from standard locations.
    • supported formats:
      • yaml

      • toml

      • conf (ini)

  • Locate standard data directories

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 all possible data-locations (existing and prospective)

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

xdgpspconf-0.0.dev0.tar.gz (12.9 kB view hashes)

Uploaded Source

Built Distribution

xdgpspconf-0.0.dev0-py3-none-any.whl (14.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page