Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

box Build Status codecov PyPI version

Box of Python Class and Object

Installation

Need Python 3.6+.

pip install box-box

Usage

import box


@box.register
class CustomModule:
    @classmethod
    def factory(cls, config):
        return cls()

# 1. load class from name
obj_class = box.load('CustomModule')
obj = obj_class()

# 2. object factory from config
obj = box.factory(config={
    'type': 'CustomModule'
})

About

Box of Python Class and Object

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages