Skip to main content

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).

Project details


Release history Release notifications

This version
History Node

0.1.1

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mb_confy-0.1.1-py2.py3-none-any.whl (5.5 kB) Copy SHA256 hash SHA256 Wheel any Apr 15, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page