Utilities for the python package 'param'
Project description
pydrobert-param
Utilities for the python package param
This is student-driven code, so don't expect a stable API. I'll try to use semantic versioning, but the best way to keep functionality stable is by pinning the version in the requirements or by forking.
While param is a great tool for keeping track of parameters, currently
serialization is restricted to pickling and unpickling objects.
pydrobert-param takes the stance that parameter (de)serialization has an
intuitive and obvious representation in most cases. The developer can modify
how pydrobert-param (de)serializes param.Parameterized
instances according
to her needs.
A teaser:
import param
import pydrobert.param.serialization as serial
class Foo(param.Parameterized):
my_int = param.Integer(10)
first, second = Foo(), Foo()
first.my_int = 30
serial.serialize_to_json('foo.json', first)
serial.deserialize_from_json('foo.json', second)
assert first.my_int == second.my_int
More complicated examples can be found in the documentation.
Documentation
Installation
pydrobert-param is available via both PyPI and Conda.
conda install -c sdrobert pydrobert-param
pip install pydrobert-param
pip install git+https://github.com/sdrobert/pydrobert-param # bleeding edge
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
Hashes for pydrobert_param-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bf96aefad9b46cb47a21944f4409f7ee0ad3438c15e9c951f43f81df3337d72 |
|
MD5 | 2c9ac8cefcae6e109b62c7892ad4f090 |
|
BLAKE2b-256 | d48d5ec9957a6152c3d2f59eb3770392092bc08d50ee0d476575cd67150cd5fb |