Standalone Loader class for simplification of loading configurations from YAML, JSON, SQL or TXT files.
Project description
Introduction
Standalone Loader class simplifies loading of content from files .yaml
, .json
, .sql
, and .txt
.
Quick Start
# import the Loader class
from surquest.utils.loader import Loader
# load a yaml file
config_yaml = Loader.load(path="./path/to/config.yaml")
# alternatively load of yaml file
config_yaml = Loader.load_yaml(path="./path/to/config.yaml")
# load a json file
config_json = Loader.load(path="./path/to/config.json")
# alternatively load of json file
config_json = Loader.load_json(path="./path/to/config.json")
# load a sql file
config_sql = Loader.load(path="./path/to/config.sql")
# alternatively load of sql file
config_sql = Loader.load_sql(path="./path/to/config.sql")
Local development
You are more than welcome to contribute to this project. To make your start easier we have prepared a docker image with all the necessary tools to run it as interpreter for Pycharm or to run tests.
Build docker image
docker build `
--tag surquest/utils/loader `
--file package.base.dockerfile `
--target test .
Run tests
docker run --rm -it `
-v "${pwd}:/opt/project" `
-w "/opt/project/test" `
surquest/utils/loader pytest
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 Distribution
Built Distribution
Close
Hashes for surquest_utils_loader-0.0.1rc3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 812317ddf93430908445ac0af24fa3c95191e7c38a6bc1f1a171557e5e23f56f |
|
MD5 | e65ad6d9b9c154866c988cd3f4aa4ea1 |
|
BLAKE2b-256 | 8a4ecfa6cd1d4c656155a4f2751e600a1a8c0c2a761d07a3e5b8da69b914ce0f |
Close
Hashes for surquest_utils_loader-0.0.1rc3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb592f9dd1a1f511bc3761c7bf3da4da82254cbcf537a80c88133c161ff277c0 |
|
MD5 | 8cfe5a4cde3f2e17a85a504e2de36cd7 |
|
BLAKE2b-256 | 50a14a1b1ee51b3340677b97f3984f3dfd8df3ef02b0195619f337f139127679 |