/expando

xo + xo.redis : Dynamic Dictionary Object Wrapper with superpowers

Primary LanguagePython

expando

Dynamic Dictionary Object Wrapper

Installation/Update

python3 -m pip install --upgrade expando xo.redis

import

from xo import xo, Expando
# or
from xo import *

Usage

# Use xo as your root object
xo.foo.bar(17).baz.plus.something = lambda *a, **kv : (f"Hello Expando! {xo.foo.bar.value}" , a, kv)
print(xo.foo.bar.baz.plus.something())

# Create a new Expando object
myStore = Expando()

to reupload to pip after edits (internal use only)

# install twine
python3 -m pip install twine 
# Skip if you have it already

export VERSION=0.5.5.1
# for xo.redis: export VERSION=0.2.5.5
# Copy/edit setup.py
# update setup.py version
python3 setup.py sdist bdist_wheel
twine upload dist/*

# to install locally (before twine upload)
python3 -m pip install --force-reinstall --no-deps . 

make sure you'd like to commit all changes

git add . git tag -a $VERSION -m "Release $VERSION" git commit -m "Release $VERSION" git push origin --tags git push