:py:mod:`glpkg.config`
======================

.. py:module:: glpkg.config


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   glpkg.config.Config



Functions
~~~~~~~~~

.. autoapisummary::

   glpkg.config.find_root



.. py:class:: Config(root: pathlib.Path, downloads: Dict[str, glpkg.package.Package] = {}, uploads: Dict[str, glpkg.package.UploadedPackage] = {})

   Normalized representation of glpkg.json and user config

   .. py:method:: load(root: Optional[pathlib.Path] = None) -> Config
      :staticmethod:

      Find glpkg.json and initialize :class:`glpkg.Config` from it.

      :param root: the path from which the search should be started.


   .. py:method:: find_package(alias: str) -> glpkg.package.Package

      Find a package by its alias.

      :raises glpkg.error.PackageNotFoundError: if package was not found


   .. py:method:: find_download(alias: str) -> glpkg.package.Package

      Find downloaded package by its alias.

      :raises glpkg.error.PackageNotFoundError: if package was not found


   .. py:method:: find_upload(alias: str) -> glpkg.package.UploadedPackage

      Find uploaded package by its alias.

      :raises glpkg.error.PackageNotFoundError: if package was not found



.. py:function:: find_root(start_dir=Path('.')) -> pathlib.Path