Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsmatias/classpyit
Simple module to make an object from dictionary
https://github.com/jsmatias/classpyit
Last synced: 29 days ago
JSON representation
Simple module to make an object from dictionary
- Host: GitHub
- URL: https://github.com/jsmatias/classpyit
- Owner: jsmatias
- Created: 2020-05-29T09:02:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-30T10:00:19.000Z (over 4 years ago)
- Last Synced: 2024-11-13T18:32:51.904Z (3 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ClassPyIt
[This module is still in initial stage]
Want to collaborate to it? You're more than welcome.Simple module to make an object from dictionary
To make it global, move it to /User/username/Library/Python/3.x/lib/python/site-packages/
To check the list of all the possible paths, which you can store the file in, run the following code in a python shell:
```
import sys
sys.path
```# Usage
Ex.:
```
from classipyit import ClassPyItd = {'Say Hi': lambda: print('Hello world'), 'age': 2, 0: 'int as a key is replaced by N'}
dObj = ClassPyIt(d)
>> print(dObj.SayHi())
Hello World>> print(dObj.N0)
'int as a key is replaced by N'```