semvec/pypi-packages huggingface dataset:
python-configuration-wrapper 1.2.0
A wrapper of python-configuration
Keywords: configuration

# Python Configuration Wrapper

This lib is basically a wrapper of the [python-configuration](https://pypi.org/project/python-configuration/).

It aims at making configuration easy !

## Features

Read multi-level configuration values from multiple sources (precedency ordered):
1. Command line arguments given by `--additional-config` or `-C` parameter.

    Example: 
    ```
    python app.py -C "database.dialect=postgresql" --additional-config "database.host=postgres.mydomain.org" -C "database.user=admin"
    ```
1. Environment variables starting with prefix set in the `CONFIG_PREFIX` environment variable. Level separator is `__` (double underscore).

   Example:
   ```
   CONFIG_PREFIX=TEST TEST__database__user=root python app.py
   ```
   
1. Config directories given by `--config-path` or `-P` parameter. The value of this parameter must be a directory path in which the sub-directories are multi-level keys, and plain-text files content are values. It's very practical when using secrets in containers.  

   Example:
   ```
   mkdir /var/run/secrets/database -p
   echo -n 123456 > /var/run/secrets/database/password
   python app.py --config-path /var/run/secrets
   ```
   
1. Config files given by `--config-file` or `-F` parameter. File formats must be among those handled by [python-configuration](https://pypi.org/project/python-configuration/):
    * json
    * ini
    * yaml
    * toml
    * python
    
    Example:
    ```
    python app.py -F config.json --config-file config.yaml
    ```
    
    If no config file is given, the lib will look for config.{yaml|json|ini|toml|python} in the working directory.
    
## Installation
```
pip install python-configuration-wrapper
```

## Usage
```
# import the config object from the module
# you can do this in every python file you want
from python_configuration_wrapper import config

# get some value from a multi-level key
myvalue = config.myfirstlevel.mysecondlevel.mykey
```

## Example 

See [test](./test)
phasefield 1.2.0
Interface problem solver based on the phase-field methodology

Automatic Construction of Phasefield Approximations from Sharp-Interface Models
===============================================================================

The title says it all: this module uses a simple description of a sharp
interface problem to derive a phasefield approximation which can then be
solved using a finite-element toolbox. The domain specific language
[UFL][ufllink] is used both for defining the sharp interface model and for
the weak formulation of the phasefield approximation. The resulting UFL form
can then be inserted into any of the finite element packages available
which can take UFL forms as an input. A class for evolving the solution
over time is available based on [dune][dunelink]  and [fenics][fenicslink].
The bindings for the `dune` package are based on the dune module
[dune-fem package][fempylink] include both dynamic local grid refinement
and coarsening. This makes it easy to track the interface with a fine grid
while a coarser grid can be used away from the interface. This is essential
for evolving phasefield models efficiently. In addition the `dune` stepper
also provides an efficient solver for obstacle problems so that double
obstacle potentials can be used in the modelling. This solver is based
on [tnmg][tnmglink].

So far this module has been tested with:

- two phase models including additional bulk equations, e.g., for the temperature
- multphase models
- single phase models, e.g., crack propagation problems

Installation
------------
The easiest way to test this module is to install the python package from
the python package index:

```
pip install phasefield
```

Some example scripts showing how to use the package can then be optained by
calling

```
python -m phasefield
```

The scripts are then located in the subfolder `phasefield_tutorial`.

You can also clone the git repository
```
git clone https://git.imp.fu-berlin.de/agnumpde/dune-tnnmg
```
and access the examples in the folder `phasefield/tutorial`.
To get the python package up and running first execute
```
pip install -e .
```
in the main folder of the repository.

[ufllink]: https://fenics.readthedocs.io/projects/ufl/en/latest/
[fenicslink]: https://fenicsproject.org/
[dunelink]: http://dune-project.org
[fempylink]: https://gitlab.dune-project.org/dune-fem/dune-fem
[tnmglink]: https://git.imp.fu-berlin.de/agnumpde/dune-tnnmg