# expiredict
### 介绍
python的一个小模块,支持时间过期及限制key个数的dict,涵盖所有常用的dict方法。
[expiredict 更多介绍](http://xiaorui.cc "xiaorui.cc")
New Future
1. support len
2. support clear
To Do List
1. logging
.....
### 安装
1. 源码安装
```
git@github.com:rfyiamcool/expiredict.git
python setup.py install
```
2. pip 安装
```
pip install expiredict
```
### 使用方法
```
import time
from expiredict import ExpireDict
d = ExpireDict(10)
d['a'] = 'abc'
print d.clear()
print "clear data :%s"%d.keys()
d['a'] = 'abc'
print "dict length :%s"%len(d)
print "d.keys() : %s"%d.keys()
d.set_ttl('a',2)
print d.ttl('a')
print "return value : %s"%d['a']
time.sleep(3)
print d['a']
```
### 介绍
python的一个小模块,支持时间过期及限制key个数的dict,涵盖所有常用的dict方法。
[expiredict 更多介绍](http://xiaorui.cc "xiaorui.cc")
New Future
1. support len
2. support clear
To Do List
1. logging
.....
### 安装
1. 源码安装
```
git@github.com:rfyiamcool/expiredict.git
python setup.py install
```
2. pip 安装
```
pip install expiredict
```
### 使用方法
```
import time
from expiredict import ExpireDict
d = ExpireDict(10)
d['a'] = 'abc'
print d.clear()
print "clear data :%s"%d.keys()
d['a'] = 'abc'
print "dict length :%s"%len(d)
print "d.keys() : %s"%d.keys()
d.set_ttl('a',2)
print d.ttl('a')
print "return value : %s"%d['a']
time.sleep(3)
print d['a']
```
Metadata
Release files for expiredict 3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| expiredict-3.1.tar.gz | 2.6 kB | Without provenance | Details |
Release files / expiredict-3.1.tar.gz
| Download URL | expiredict-3.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9d468cd22ab5b9024d9b74b5cab97c9952eea383f2c5008c1e4bab5f08e9257
|
|
BLAKE2b-256 checksum How to use checksums |
969f0b58ca9128263a1201f60f466668c075289888e2090c19341f988986b67d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for expiredict 3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.