Skip to main content

OvCfg

Project description

ovcfg

Simple module for creating your config files and use it in your projects. Configs may store in /etc and user local directory (~/.config).

Prerequisites

- Python3.5 or newer

Installion

$ python3 -m pip install ovcfg

OR

$ python3 -m pip install git+https://github.com/jok4r/ovcfg.git

Usage

from ovcfg import Config

default_config = {
        'first': 'first param',
        'second': 'second param',
    }
cfg = Config(default_config, 'config_name_here.json', 'config_dir_name').import_config()

Config file in code above will create config with local path "~/.config/config_dir_name/config_name_here.json" OR /etc/config_dir_name/config_name_here.json (if have write permissions to /etc) MIT License

Copyright (c) 2021 Dmitry Yakovlev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

ovcfg-1.3.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovcfg-1.3.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file ovcfg-1.3.2.tar.gz.

File metadata

  • Download URL: ovcfg-1.3.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.3

File hashes

Hashes for ovcfg-1.3.2.tar.gz
Algorithm Hash digest
SHA256 ff00b3e11511921da40b8cc9c1b05d900439b6c923ae9f5e4687fe74ff80b040
MD5 b83059eafbf0421332803f29acf72379
BLAKE2b-256 7c7c4e2944a0359c72c52a4c26bc126fcefcb0627e27027fad83582d4d328ae2

See more details on using hashes here.

File details

Details for the file ovcfg-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: ovcfg-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.3

File hashes

Hashes for ovcfg-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 35151147101007ef64e4f05b5b1f5311d62969b246c561bebf588acf285c9d3c
MD5 f5f891b7f3cfe8317500d438e8a6e08d
BLAKE2b-256 a1a452b0479b63dc2f37b7de1d7df593410b740558e4d55a3f8687f62c6112a7

See more details on using hashes here.

Supported by

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