Simple Python script to convert a dict into a class instance
Project description
Object To Class
a simple python script to convert dict into a class instance
example
# import the package
from objecttoclass import ObjectToClass as OTC
# or : from objecttoclass import OTC (Variable holding the ObjectToClass instance )
# set the data you want to convert
data = {
"name":"Hussein Naim"
}
# new OTC instance
instance = OTC(data)
# print out the name attr
print(instance.name)
# output: Hussein Naim
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
objecttoclass-0.0.1.tar.gz
(1.8 kB
view details)
Built Distribution
File details
Details for the file objecttoclass-0.0.1.tar.gz
.
File metadata
- Download URL: objecttoclass-0.0.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b72b40da3dfb50a36f534fed6a7d39e44e34a4bf647e457f33c61a5ce4d11e30 |
|
MD5 | 1a3345cd19b5b75808c265046fd7aa4b |
|
BLAKE2b-256 | b170af450dbcd4a6b127b805974f32cfb807102d38e5fe85633fa8fa4f45840d |
File details
Details for the file objecttoclass-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: objecttoclass-0.0.1-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93851e5c8577b3baab70dbcae91cfa72e182f37533a7ce5a0af2b80625b78fda |
|
MD5 | 41d4afa88f9e23b20c873e208ecf678f |
|
BLAKE2b-256 | 215a7d5fd99d8aee13f890704be61ed12f37a6a038fdb08371c6a0b6edebb175 |