*************************
xdgpspconf
*************************
**XDG** **P**\ latform **S**\ uited **P**\ roject **CONF**\ iguration
Gist
==========
Source Code Repository
---------------------------
|source| `Repository <https://gitlab.com/pradyparanjpe/xdgpspconf.git>`__
|pages| `Documentation <https://pradyparanjpe.gitlab.io/xdgpspconf>`__
Badges
---------
|Pipeline| |Coverage| |PyPi Version| |PyPi Format| |PyPi Pyversion|
Description
==============
Handle platform suited xdg-base to
- Read configuration from standard locations.
- supported formats:
- yaml
- json
- toml
- conf (`ini <https://setuptools.pypa.io/en/latest/userguide/declarative_config.html#specifying-values>`__)
- 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 <https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html>`__.
What does it do
--------------------
- Lists possible xdg-locations (existing and prospective)
CACHE
~~~~~~~~~
``XDG_CACHE_HOME``
DATA
~~~~~~~
- ``XDG_DATA_HOME``
- ``XDG_DATA_DIRS``
STATE
~~~~~~~~
- ``XDG_STATE_HOME``
- ``XDG_STATE_DIRS``
CONFIG
~~~~~~~~
- Reads configuration files from standard Windows/POSIX locations, current folder and optionally all ancestors and custom locations.
Platform-specific
^^^^^^^^^^^^^^^^^^^
Windows
""""""""""
- ``%LOCALAPPDATA%\<PROJECT>\config``
- ``%USERPROFILE%\AppData\Local\<PROJECT>\config``
POSIX
""""""""""
[Linux/MacOS]
- ``${XDG_CONFIG_HOME:-${HOME}/.config}/<PROJECT>/config``
- ``${XDG_CONFIG_HOME:-${HOME}/.config}/<PROJECT>``
- ``${XDG_CONFIG_HOME:-${HOME}/.config}/<PROJECT>rc``
- ``$DIR/<PROJECT>/config`` for each ``$DIR`` in ``$XDG_CONFIG_DIRS``
.. tip::
Configuration file name 'config' is customizable.
Environment
-------------
- declared variable: ``%<PROJECT>RC%`` for Windows or ``$<PROJECT>`` for POSIX
Improper
-----------
- ``${HOME}/.<PROJECT>rc``
.. warning::
This is disabled by default and deprecated, since it does not conform to XDG standards.
Custom
---------
- configuration path: supplied in function
Relative
---------
``./.<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
TODO
===========
- Implementation for following variables:
- XDG_RUNTIME_DIR
- `Other <https://www.freedesktop.org/software/systemd/man/pam_systemd.html>`__ XDG specifications.
- Arbitrarily defined **XDG_.*** environment variables
.. |Pipeline| image:: https://gitlab.com/pradyparanjpe/xdgpspconf/badges/testing/pipeline.svg
.. |source| image:: https://about.gitlab.com/images/press/logo/svg/gitlab-icon-rgb.svg
:width: 50
:target: https://gitlab.com/pradyparanjpe/xdgpspconf.git
.. |pages| image:: https://about.gitlab.com/images/press/logo/svg/gitlab-logo-gray-stacked-rgb.svg
:width: 50
:target: https://pradyparanjpe.gitlab.io/xdgpspconf
.. |PyPi Version| image:: https://img.shields.io/pypi/v/xdgpspconf
:target: https://pypi.org/project/xdgpspconf/
:alt: PyPI - version
.. |PyPi Format| image:: https://img.shields.io/pypi/format/xdgpspconf
:target: https://pypi.org/project/xdgpspconf/
:alt: PyPI - format
.. |PyPi Pyversion| image:: https://img.shields.io/pypi/pyversions/xdgpspconf
:target: https://pypi.org/project/xdgpspconf/
:alt: PyPi - pyversion
.. |Coverage| image:: https://gitlab.com/pradyparanjpe/xdgpspconf/badges/master/coverage.svg?skip_ignored=true
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/pradyparanjpe/xdgpspconf.git",
"name": "xdgpspconf",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "xdg, cascading, configuration",
"author": "Pradyumna Paranjape",
"author_email": "pradyparanjpe@rediffmail.com",
"download_url": "https://files.pythonhosted.org/packages/40/ca/5aec1fe2c53115316640dcb280230ef0a4c2f430652dd729fea6e82cfe4b/xdgpspconf-1.1.1.tar.gz",
"platform": "linux",
"description": "*************************\nxdgpspconf\n*************************\n\n**XDG** **P**\\ latform **S**\\ uited **P**\\ roject **CONF**\\ iguration\n\nGist\n==========\n\nSource Code Repository\n---------------------------\n\n|source| `Repository <https://gitlab.com/pradyparanjpe/xdgpspconf.git>`__\n\n|pages| `Documentation <https://pradyparanjpe.gitlab.io/xdgpspconf>`__\n\nBadges\n---------\n\n|Pipeline| |Coverage| |PyPi Version| |PyPi Format| |PyPi Pyversion|\n\n\nDescription\n==============\n\nHandle platform suited xdg-base to\n\n- Read configuration from standard locations.\n\n - supported formats:\n - yaml\n - json\n - toml\n - conf (`ini <https://setuptools.pypa.io/en/latest/userguide/declarative_config.html#specifying-values>`__)\n\n- Write configuration to most general, writable xdg-location\n- Locate standard directories:\n - xdg_cache\n - xdg_config\n - xdg_data\n - xdg_state\n\nXDG Specification\n---------------------\n\nView xdg specifications `here <https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html>`__.\n\n\nWhat does it do\n--------------------\n\n- Lists possible xdg-locations (existing and prospective)\n\nCACHE\n~~~~~~~~~\n\n``XDG_CACHE_HOME``\n\nDATA\n~~~~~~~\n- ``XDG_DATA_HOME``\n- ``XDG_DATA_DIRS``\n\nSTATE\n~~~~~~~~\n- ``XDG_STATE_HOME``\n- ``XDG_STATE_DIRS``\n\nCONFIG\n~~~~~~~~\n\n- Reads configuration files from standard Windows/POSIX locations, current folder and optionally all ancestors and custom locations.\n\nPlatform-specific \n^^^^^^^^^^^^^^^^^^^\n\nWindows\n\"\"\"\"\"\"\"\"\"\"\n- ``%LOCALAPPDATA%\\<PROJECT>\\config``\n- ``%USERPROFILE%\\AppData\\Local\\<PROJECT>\\config``\n\nPOSIX\n\"\"\"\"\"\"\"\"\"\"\n\n[Linux/MacOS]\n\n- ``${XDG_CONFIG_HOME:-${HOME}/.config}/<PROJECT>/config``\n- ``${XDG_CONFIG_HOME:-${HOME}/.config}/<PROJECT>``\n- ``${XDG_CONFIG_HOME:-${HOME}/.config}/<PROJECT>rc``\n- ``$DIR/<PROJECT>/config`` for each ``$DIR`` in ``$XDG_CONFIG_DIRS``\n\n.. tip::\n\n Configuration file name 'config' is customizable.\n\nEnvironment\n-------------\n\n- declared variable: ``%<PROJECT>RC%`` for Windows or ``$<PROJECT>`` for POSIX\n\nImproper\n-----------\n\n- ``${HOME}/.<PROJECT>rc``\n\n.. warning::\n\n This is disabled by default and deprecated, since it does not conform to XDG standards.\n\nCustom\n---------\n\n- configuration path: supplied in function\n\nRelative\n---------\n\n``./.<PROJECT>rc``\n\nAncestors\n~~~~~~~~~~~\n\nAny of the parents, till project root or mountpoint, that contains ``__init__.py``, where,\n\n- project root is the directory that contains ``setup.cfg`` or ``setup.py``\n- mountpoint is checked using ``pathlib.Path.drive`` on windows or ``pathlib.Path.is_mount()`` on POSIX\n\n\nTODO\n===========\n- Implementation for following variables:\n - XDG_RUNTIME_DIR\n - `Other <https://www.freedesktop.org/software/systemd/man/pam_systemd.html>`__ XDG specifications.\n - Arbitrarily defined **XDG_.*** environment variables\n\n\n.. |Pipeline| image:: https://gitlab.com/pradyparanjpe/xdgpspconf/badges/testing/pipeline.svg\n\n.. |source| image:: https://about.gitlab.com/images/press/logo/svg/gitlab-icon-rgb.svg\n :width: 50\n :target: https://gitlab.com/pradyparanjpe/xdgpspconf.git\n\n.. |pages| image:: https://about.gitlab.com/images/press/logo/svg/gitlab-logo-gray-stacked-rgb.svg\n :width: 50\n :target: https://pradyparanjpe.gitlab.io/xdgpspconf\n\n.. |PyPi Version| image:: https://img.shields.io/pypi/v/xdgpspconf\n :target: https://pypi.org/project/xdgpspconf/\n :alt: PyPI - version\n\n.. |PyPi Format| image:: https://img.shields.io/pypi/format/xdgpspconf\n :target: https://pypi.org/project/xdgpspconf/\n :alt: PyPI - format\n\n.. |PyPi Pyversion| image:: https://img.shields.io/pypi/pyversions/xdgpspconf\n :target: https://pypi.org/project/xdgpspconf/\n :alt: PyPi - pyversion\n\n.. |Coverage| image:: https://gitlab.com/pradyparanjpe/xdgpspconf/badges/master/coverage.svg?skip_ignored=true\n",
"bugtrack_url": null,
"license": "LGPLv3",
"summary": "xdgpspconf - XDG Platform Suited Project configuration",
"version": "1.1.1",
"project_urls": {
"Documentation": "https://pradyparanjpe.gitlab.io/xdgpspconf",
"Homepage": "https://gitlab.com/pradyparanjpe/xdgpspconf.git",
"Source_url": "https://gitlab.com/pradyparanjpe/xdgpspconf.git"
},
"split_keywords": [
"xdg",
" cascading",
" configuration"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bda82846336252ba78c27b4b657b3604516017ca943fa055c5d1bd4a8e98bef8",
"md5": "a3bd5a7dd38a94489803385598a01067",
"sha256": "30409ee66035f79213de7920ad5956e7fd232352c6ea5721df9aa657fc6fff70"
},
"downloads": -1,
"filename": "xdgpspconf-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a3bd5a7dd38a94489803385598a01067",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 25248,
"upload_time": "2024-08-15T05:58:30",
"upload_time_iso_8601": "2024-08-15T05:58:30.784379Z",
"url": "https://files.pythonhosted.org/packages/bd/a8/2846336252ba78c27b4b657b3604516017ca943fa055c5d1bd4a8e98bef8/xdgpspconf-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "40ca5aec1fe2c53115316640dcb280230ef0a4c2f430652dd729fea6e82cfe4b",
"md5": "d6e14026ccebd7f0a49294d18107080a",
"sha256": "92447739b32939278cd82c66b52a9dc248f19d76d1a72ec0c44f7aad3abab077"
},
"downloads": -1,
"filename": "xdgpspconf-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d6e14026ccebd7f0a49294d18107080a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 27322,
"upload_time": "2024-08-15T05:58:34",
"upload_time_iso_8601": "2024-08-15T05:58:34.042813Z",
"url": "https://files.pythonhosted.org/packages/40/ca/5aec1fe2c53115316640dcb280230ef0a4c2f430652dd729fea6e82cfe4b/xdgpspconf-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-15 05:58:34",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "pradyparanjpe",
"gitlab_project": "xdgpspconf",
"lcname": "xdgpspconf"
}