Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/claymcleod/trapdoor
Turn-key configuration file management for Python packages.
https://github.com/claymcleod/trapdoor
configuration python
Last synced: 4 months ago
JSON representation
Turn-key configuration file management for Python packages.
- Host: GitHub
- URL: https://github.com/claymcleod/trapdoor
- Owner: claymcleod
- Created: 2021-11-22T19:19:28.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-17T13:21:56.000Z (over 1 year ago)
- Last Synced: 2024-10-11T12:14:51.831Z (4 months ago)
- Topics: configuration, python
- Language: Python
- Homepage: https://claymcleod.github.io/trapdoor/
- Size: 223 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
Trapdoor
Turn-key configuration file management for Python packages.
Explore the docs »
Request Feature
·
Report Bug
·
⭐ Consider starring the repo! ⭐
## 🎨 Features
* Config Files. Trapdoor makes it easy to create and maintain TOML configuration files.
* Minimal Configuration. Set your store name and start setting and getting keys from the configuration file. Sane defaults are set and useful for most cases.
* Secure Practices. By default, configuration directories are created to be only readable by the user who created them.## 📚 Getting Started
### Installation
#### Python Package Index
You can also install `trapdoor` using the Python Package Index ([PyPI](https://pypi.org/)).
```bash
pip install trapdoor
```## 🚌 A Quick Tour
At its foundation, trapdoor is meant to ease the process of creating and maintaining configuration files within your Python tool. Commonly, you will want to use it to create a configuration store, get existing configuration keys, and set configuration keys.
If you're interested in a complete overview of trapdoor's capabilities, please see [**the documentation pages**](https://claymcleod.github.io/trapdoor/).
```python
# import trapdoor
from trapdoor import Trapdoort = Trapdoor('trapdoor-test') # create a store at ~/.trapdoor-test/config.yml (by default)
t.set('some.nested.key.hello', 'world') # set a key in the configuration file
t.get('some.nested.key.hello') # get a key from the configuration file
```For more information, please see [the documentation](https://claymcleod.github.io/trapdoor).
## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/claymcleod/trapdoor/issues). Please ensure you fill out the entire template for each of these. You can also take a look at the [contributing guide][contributing-md].## 📝 License
Copyright © 2021 Clay McLeod. This project is [MIT][license-md] licensed.
[contributing-md]: https://github.com/claymcleod/trapdoor/blob/main/CONTRIBUTING.md
[license-md]: https://github.com/claymcleod/trapdoor/blob/main/LICENSE.md