Cfitall

Latest version: v2.0.1

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2.0.0

Extensible Configuration Providers

With the v2.0.0 release, `cfitall` moves to extensible [configuration providers](https://cfitall.readthedocs.io/en/v2.0.0/providers.html). Following a simple [interface](https://cfitall.readthedocs.io/en/v2.0.0/_autosummary/cfitall.providers.base.ConfigProviderBase.html), anyone can now hook their own configuration provider into `cfitall` and benefit from all of its other features.

The included [`EnvironmentProvider`](https://cfitall.readthedocs.io/en/v2.0.0/_autosummary/cfitall.providers.environment.EnvironmentProvider.html) and [`FilesystemProvider`](https://cfitall.readthedocs.io/en/v2.0.0/_autosummary/cfitall.providers.filesystem.FilesystemProvider.html) are reference implementations that replicate existing functionality from the 1.0 series. They implement [`ConfigProviderBase`](https://cfitall.readthedocs.io/en/v2.0.0/_autosummary/cfitall.providers.base.ConfigProviderBase.html), which is the base base class to implement if you want to write a Provider.

Providers are managed by a [`ProviderManager`](https://cfitall.readthedocs.io/en/v2.0.0/_autosummary/cfitall.manager.ProviderManager.html), which is responsible for registering and deregistering providers, and controls the order in which provider configurations are merged.

The provider abstraction provides an important layer of extensibility for adding new configuration sources like etcd, consul, and more to cfitall in the future, even as separate packages.

Environment Variable Parsing

Environment variable parsing (now handled by the EnvironmentProvider) has changed somewhat in the v2 release:

* Values must now be enclosed in square brackets to be interpreted as lists, e.g. `export APP__THINGS="[first, second, third]"` for `cf.get('things')` to return `['first', 'second', 'third']`.
* Nesting of commas is not directly supported. This will not work out of the box: `export APP__PEOPLE="['doe, john', 'deer, jane']"`. However, you can experiment with the [`value_separator`](https://cfitall.readthedocs.io/en/v2.0.0/_autosummary/cfitall.providers.environment.EnvironmentProvider.html#cfitall.providers.environment.EnvironmentProvider.value_separator), which is treated as a regex, to potentially solve for such advanced use cases.

Documentation

The documentation from the `README` has been removed to the `docs/` directory and supplemented considerably. These docs are now built with Sphinx and hosted on [Read The Docs](http://cfitall.readthedocs.io/).

Quality & Testing

* type hints were added throughout the source for v2
* all mypy tests are passing
* 53 unit tests (roughly 96% test coverage) are passing

Minimum Python Version

* Python 3.8 is the minimum supported version for v2.

1.0.4

1.0.3

1.0.2

1.0.1

Support for converting 'true' and 'false' strings in environment variables to python booleans.

1.0.0

initial release!

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.