Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fire17/expando
xo + xo.redis : Dynamic Dictionary Object Wrapper with superpowers
https://github.com/fire17/expando
Last synced: 2 days ago
JSON representation
xo + xo.redis : Dynamic Dictionary Object Wrapper with superpowers
- Host: GitHub
- URL: https://github.com/fire17/expando
- Owner: fire17
- Created: 2022-12-26T16:51:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-11T03:54:17.000Z (over 1 year ago)
- Last Synced: 2024-11-08T23:58:11.995Z (5 days ago)
- Language: Python
- Homepage:
- Size: 708 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# expando
Dynamic Dictionary Object Wrapper## Installation/Update
```python
python3 -m pip install --upgrade expando xo.redis
```## import
```python
from xo import xo, Expando
# or
from xo import *
```## Usage
```python# 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 alreadyexport 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
```