aliasdict-0.9.5
توضیحات
a dict that supports alias of KEY
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | aliasdict-0.9.5 |
| نام | aliasdict |
| نسخه کتابخانه | 0.9.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | yokoshin |
| ایمیل نویسنده | yokoshin719@yahoo.co.jp |
| آدرس صفحه اصلی | https://bitbucket.org/yokoshin/aliasdict |
| آدرس اینترنتی | https://pypi.org/project/aliasdict/ |
| مجوز | - |
================
AliasDict
================
This module helps users to make multiple keys dict with same value.
In addition to that, this dict automatically gzip-compress values.
So it's very efficient.
I hope this module helps you python programing in your lap-top PC.
Quickstart
----------
Install cachelite::
pip install aliasdict
Then you can use it.
.. code-block:: python
import aliasdict from AliasDict
adct = AliasDict()
#if you don't need value compression, AliasDict(compress=False)
#put a key-value
adct["YOUR_KEY"] = "YOUR_VALUE"
#set a alias to key
adct.set_alias("YOUR_KEY", "YOUR_ALIAS")
#get value by alias
adct["YOUR_ALIAS"]
#save1
with open( "PATH_TO_FILE", "wb") as f:
adct.dump(f)
#save2
with open( "PATH_TO_FILE", "wb") as f:
f.write(adct.dumps())
#load1
with open( "PATH_TO_FILE", "rb") as f:
adct = AliasDict.load(f)
#load2
with open( "PATH_TO_FILE", "rb") as f:
adct = AliasDict.loads(f.read())
نحوه نصب
نصب پکیج whl aliasdict-0.9.5:
pip install aliasdict-0.9.5.whl
نصب پکیج tar.gz aliasdict-0.9.5:
pip install aliasdict-0.9.5.tar.gz