Skip to content

tleb/the_rack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

the_rack

A cachable collection with extension abilities

Install using pip

pip install the_rack

Usage example

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.

This code is licenced under the MIT license.

About

A cachable collection with extension abilities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages