https://github.com/timelessnesses/dta
dta Convert Dict To Attributes!
https://github.com/timelessnesses/dta
attribute attributes dictionary python python2 python3 small-projects
Last synced: about 1 year ago
JSON representation
dta Convert Dict To Attributes!
- Host: GitHub
- URL: https://github.com/timelessnesses/dta
- Owner: timelessnesses
- Created: 2021-11-30T12:50:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-31T05:53:56.000Z (about 4 years ago)
- Last Synced: 2024-10-18T13:16:43.495Z (over 1 year ago)
- Topics: attribute, attributes, dictionary, python, python2, python3, small-projects
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dta (Dict to Attributes)
dta is very small dict (or json) to attributes converter.
It is only have 1 files and applied to every python versions.
No need dependencies required so your repository size won't go to hell.
## Features
- Ability to convert lame dict object to class attributes!
- Ability to convert those attributes back to dict!
## Installation
Use pip to install [package](https://pypi.org/project/dta)
```bash
pip install dta
```
Or Use github repository and build it
```bash
pip install git+https://github.com/dumb-stuff/dta
```
## Usage
Import dta.
```py
import dta
```
For converting to attributes do
```py
import dta
SomeCoolConvertedDictToAttributes = dta.Dict2Attr({"stuff":["balls","watch anime girls","OwO"]})
SomeCoolConvertedDictToAttributes.stuff[1]
```
For converting attributes back to dict for saving purpose do
```py
import dta
dta.Attr2Dict(SomeCoolConvertedDictToAttributes)
```