A dictionary backed by a real .json file
Project description
# Confy: A dictionary backed by a real .json file
Confy is a dictionary with a `.save()` method. Acts exactly the same as a regular dictionary otherwise.
## Install
`pip install mb-confy`
## Use
```python
from confy import Confy
configPath = "config.json"
config = Confy(configPath)
if "timesOpened" in config:
timesOpened = config["timesOpened"]
else:
timesOpened = 0
print("Opened {} times".format(timesOpened))
config["timesOpened"] = timesOpened + 1
```
## Licensing
MIT
## Author
Made by Martijn Brekelmans. This project is used in [SMG music display](https://martijnbrekelmans.com/SMG).
Confy is a dictionary with a `.save()` method. Acts exactly the same as a regular dictionary otherwise.
## Install
`pip install mb-confy`
## Use
```python
from confy import Confy
configPath = "config.json"
config = Confy(configPath)
if "timesOpened" in config:
timesOpened = config["timesOpened"]
else:
timesOpened = 0
print("Opened {} times".format(timesOpened))
config["timesOpened"] = timesOpened + 1
```
## Licensing
MIT
## Author
Made by Martijn Brekelmans. This project is used in [SMG music display](https://martijnbrekelmans.com/SMG).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mb_confy-0.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: mb_confy-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dd73026e73e6843edd77ebfbd974ae796c3d71d588a64cc18f70ba46a007e73
|
|
| MD5 |
0085ebc9c512440401cdd964704b68ac
|
|
| BLAKE2b-256 |
a6ffd29acb06a3da50be4b75b580ba9250aa78066b1acc115a79e97af17a5c5c
|