Skip to main content

Python package making it easier to work with lots of parameters

Project description

Travis CI build status (Linux) AppVeyor CI build status (Windows) Code Coverage Documentation Status

Python package making it easier to work with lots of parameters.

Features

  • Lightweight: only depends on PyYAML

  • Cross-platform: Linux, Mac and Windows are all supported

  • Tested with Python 2.7, 3.3, 3.4, and 3.5

Quick Guide

To install jicparameters:

git clone https://github.com/JIC-CSB/jicparameters.git
cd jicparameters
python setup.py install

Create some parameters:

>>> from jicparameters import Parameters
>>> params = Parameters(pi=3.14, radius=10)
>>> params
{'pi': 3.14, 'radius': 10}

Add another parameter:

>>> params["fudge_factor"] = 42
>>> params
{'fudge_factor': 42, 'pi': 3.14, 'radius': 10}

View as YAML:

>>> print(params.to_yaml())
---
fudge_factor: 42
pi: 3.14
radius: 10
<BLANKLINE>

Save to file:

>>> params.to_file("params.yml")

Read from file:

>>> p2 = Parameters.from_file("params.yml")
>>> assert params == p2

History

0.1.0

  • Initial upload to PyPi

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

jicparameters-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file jicparameters-0.1.0.tar.gz.

File metadata

  • Download URL: jicparameters-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jicparameters-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5c24977fec79bfbdd854fba5a84f9b80b842107e9c98f6e6257fd46b18a5a877
MD5 cf38197e3e706b3d0bd00866b95a7c69
BLAKE2b-256 3692e301a5c65013ad428dc020ba75ecbf21836ca1ffc6ecd6ffbc25dcb84657

See more details on using hashes here.

Supported by

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