A cachable collection with extension abilities
Project description
the_rack
========
> A cachable collection with extension abilities
## Install using pip
pip install the_rack
## Usage example
```python
from the_rack import Rack
class Foo: pass
c = Rack()
c['foo'] = lambda get: Foo()
c['foo'] # Foo object
class Bar:
def __init__(self, foo): pass
c['bar'] = lambda get: Bar(get('foo'))
c['bar'] # Bar object
assert c['bar'] == c['bar'] # Caching
```
The complete usage is explained [in the doc](doc.md).
This code is licenced under [the MIT license](https://tleb.mit-license.org/).
========
> A cachable collection with extension abilities
## Install using pip
pip install the_rack
## Usage example
```python
from the_rack import Rack
class Foo: pass
c = Rack()
c['foo'] = lambda get: Foo()
c['foo'] # Foo object
class Bar:
def __init__(self, foo): pass
c['bar'] = lambda get: Bar(get('foo'))
c['bar'] # Bar object
assert c['bar'] == c['bar'] # Caching
```
The complete usage is explained [in the doc](doc.md).
This code is licenced under [the MIT license](https://tleb.mit-license.org/).
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
the_rack-1.0.1.tar.gz
(2.8 kB
view details)
File details
Details for the file the_rack-1.0.1.tar.gz.
File metadata
- Download URL: the_rack-1.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d118fc749f64c5dbb6bdf75649b07a298cfd2105b802af099341534a5f9e3b19
|
|
| MD5 |
5af37712aadc5bd6d96ddba5f3d15174
|
|
| BLAKE2b-256 |
567a447015ad2e34ea041b82fc635830930ae8e4503b3aa57771ca91107de395
|