
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Update on 2019-05-13: Version 1.35 and above require Python 3.6+.
Update on 2018-10-20: I no longer use this library. It tries to do too many things. It was written in Python 2.7 and made work with Python 3. With type hints, dataclasses, and many other cool features in Python 3.6+ you can express the same things in a much nicer way than this.
.. image:: https://travis-ci.org/jbasko/configmanager.svg?branch=master :target: https://travis-ci.org/jbasko/configmanager
Don't let standard library's configparser drive your configuration value access design. Let it do what it does best -- parse and write configuration files. And let configmanager do the rest.
https://jbasko.github.io/configmanager/
https://github.com/jbasko/configmanager
Install from Python Package index with pip install configmanager
.
Declare your configuration, the sources, and off you go.
Remember, every configuration item is an object, not just a plain
configuration value.
If you don't need the rich features of configuration items,
use configmanager.PlainConfig
instead.
.. code-block:: python
import warnings
from configmanager import Config
config = Config({
'uploads': {
'threads': 1,
'enabled': False,
'db': {
'user': 'root',
'password': {
'@default': 'root',
'@envvar': 'MY_UPLOADER_DB_PASSWORD',
},
}
}
}, load_sources=[
'/etc/my-uploader/config.ini',
'~/.config/my-uploader/config.json',
], auto_load=True)
if config.uploads.db.user.is_default:
warnings.warn('Using default db user!')
if config.uploads.enabled.get():
connect_to_database(
user=config.uploads.db.user.get(),
password=config.uploads.db.password.get(),
)
FAQs
Forget about configparser, YAML, or JSON parsers. Focus on configuration.
We found that configmanager demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.