Skip to main content

Memorize settings in Python easily. Autoload and autosave settings to a file.

Project description

SettingsFile

Autoload and autoupdate your configuration with native implementation


Installation

$ pip install settingsfile

Quickstart

from settingsfile import Settings

settings = Settings('config.json')

# use settings object instance as a dict
settings['language'] = 'fr'

# however, you can use it via class attributes too with caution
settings.language = 'fr'

print(settings['language'])  # 'fr'
print(settings.language)  # 'fr'

While using the module via class attributes, there are some names that are reserved and cannot be used as they would conflict. Hence, avoid using commonplace names via attributes such as path, json, name. Of course, you can use these names in peace via dict-like assignment.

Project details


Download files

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

Source Distribution

settingsfile-1.0.2.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

settingsfile-1.0.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file settingsfile-1.0.2.tar.gz.

File metadata

  • Download URL: settingsfile-1.0.2.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.6.9

File hashes

Hashes for settingsfile-1.0.2.tar.gz
Algorithm Hash digest
SHA256 070e4edd3968003a422ccfff2c2764dca765341152b5ee129ffaf889fda43fe3
MD5 ed0e0c6ddcaf19460c8ab46bf10ff909
BLAKE2b-256 86e9c21a138c222a34628c1850a5a2459d0e9220a367d78b7213ceb3563f0bf1

See more details on using hashes here.

File details

Details for the file settingsfile-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: settingsfile-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.6.9

File hashes

Hashes for settingsfile-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c2aff107ea202e70197f632084e95fc75f47c09f2f81cc76098e95ac68d286a1
MD5 b7d6603bcdb74d05f5ec76b45692e4c8
BLAKE2b-256 2069bce28236fb0ef2fc821c7f996ea7c7b29c7a88d82ef912164916ebc6af1d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page