dottify 0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dottify-0.1/LICENSE +21 -0
- dottify-0.1/PKG-INFO +84 -0
- dottify-0.1/README.md +46 -0
- dottify-0.1/dottify/__init__.py +3 -0
- dottify-0.1/dottify/dottify.py +20 -0
- dottify-0.1/dottify.egg-info/PKG-INFO +84 -0
- dottify-0.1/dottify.egg-info/SOURCES.txt +10 -0
- dottify-0.1/dottify.egg-info/dependency_links.txt +1 -0
- dottify-0.1/dottify.egg-info/top_level.txt +1 -0
- dottify-0.1/pyproject.toml +19 -0
- dottify-0.1/setup.cfg +4 -0
- dottify-0.1/setup.py +28 -0
dottify-0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Nana Elie
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dottify-0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: dottify
|
|
3
|
+
Version: 0.1
|
|
4
|
+
Summary: Dottify est une bibliothèque Python simple qui permet de convertir des dictionnaires en objets accessibles par attributs. Au lieu d'utiliser la syntaxe classique dict["key"], vous pouvez accéder aux valeurs d'un dictionnaire en utilisant la notation par points dict.key après avoir appliqué la transformation.
|
|
5
|
+
Home-page: https://github.com/nanaelie/dottify
|
|
6
|
+
Author: Nana Elie
|
|
7
|
+
Author-email: Nana Elie <elienana92@gmail.com>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2024 Nana Elie
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
|
|
30
|
+
Project-URL: Homepage, https://github.com/pypa/dottify
|
|
31
|
+
Project-URL: Issues, https://github.com/pypa/dottify/issues
|
|
32
|
+
Classifier: Programming Language :: Python :: 3
|
|
33
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
34
|
+
Classifier: Operating System :: OS Independent
|
|
35
|
+
Requires-Python: >=3.6
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
License-File: LICENSE
|
|
38
|
+
|
|
39
|
+
# Dottify
|
|
40
|
+
|
|
41
|
+
Dottify est une bibliothèque Python simple qui permet de convertir des dictionnaires en objets accessibles par attributs. Au lieu d'utiliser la syntaxe classique dict["key"], vous pouvez accéder aux valeurs d'un dictionnaire en utilisant la notation par points dict.key après avoir appliqué la transformation.
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
Vous pouvez installer Dottify via pip :
|
|
46
|
+
|
|
47
|
+
pip install dottify
|
|
48
|
+
|
|
49
|
+
## Utilisation
|
|
50
|
+
|
|
51
|
+
Voici un exemple d'utilisation de Dottify :
|
|
52
|
+
|
|
53
|
+
from Dottify import Dottify
|
|
54
|
+
|
|
55
|
+
persons = {
|
|
56
|
+
"Alice": {
|
|
57
|
+
"age": 30,
|
|
58
|
+
"city": "Paris",
|
|
59
|
+
"profession": "Engineer"
|
|
60
|
+
},
|
|
61
|
+
"Charlie": {
|
|
62
|
+
"age": 35,
|
|
63
|
+
"city": "Marseille",
|
|
64
|
+
"profession": "Doctor"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
persons = Dottify(persons)
|
|
69
|
+
|
|
70
|
+
print(persons.Alice.age)
|
|
71
|
+
|
|
72
|
+
## Fonctionnalités
|
|
73
|
+
|
|
74
|
+
- Conversion facile de dictionnaires en objets accessibles par attributs.
|
|
75
|
+
- Prise en charge des dictionnaires imbriqués.
|
|
76
|
+
|
|
77
|
+
## Contribuer
|
|
78
|
+
|
|
79
|
+
Les contributions sont les bienvenues ! N'hésitez pas à soumettre des demandes de tirage (pull requests) ou à ouvrir des problèmes (issues) sur le dépôt GitHub.
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
Distribué sous la licence MIT. Voir LICENSE pour plus d'informations.
|
|
84
|
+
|
dottify-0.1/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Dottify
|
|
2
|
+
|
|
3
|
+
Dottify est une bibliothèque Python simple qui permet de convertir des dictionnaires en objets accessibles par attributs. Au lieu d'utiliser la syntaxe classique dict["key"], vous pouvez accéder aux valeurs d'un dictionnaire en utilisant la notation par points dict.key après avoir appliqué la transformation.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Vous pouvez installer Dottify via pip :
|
|
8
|
+
|
|
9
|
+
pip install dottify
|
|
10
|
+
|
|
11
|
+
## Utilisation
|
|
12
|
+
|
|
13
|
+
Voici un exemple d'utilisation de Dottify :
|
|
14
|
+
|
|
15
|
+
from Dottify import Dottify
|
|
16
|
+
|
|
17
|
+
persons = {
|
|
18
|
+
"Alice": {
|
|
19
|
+
"age": 30,
|
|
20
|
+
"city": "Paris",
|
|
21
|
+
"profession": "Engineer"
|
|
22
|
+
},
|
|
23
|
+
"Charlie": {
|
|
24
|
+
"age": 35,
|
|
25
|
+
"city": "Marseille",
|
|
26
|
+
"profession": "Doctor"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
persons = Dottify(persons)
|
|
31
|
+
|
|
32
|
+
print(persons.Alice.age)
|
|
33
|
+
|
|
34
|
+
## Fonctionnalités
|
|
35
|
+
|
|
36
|
+
- Conversion facile de dictionnaires en objets accessibles par attributs.
|
|
37
|
+
- Prise en charge des dictionnaires imbriqués.
|
|
38
|
+
|
|
39
|
+
## Contribuer
|
|
40
|
+
|
|
41
|
+
Les contributions sont les bienvenues ! N'hésitez pas à soumettre des demandes de tirage (pull requests) ou à ouvrir des problèmes (issues) sur le dépôt GitHub.
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
Distribué sous la licence MIT. Voir LICENSE pour plus d'informations.
|
|
46
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
class Dottify:
|
|
2
|
+
def __init__(self, dic:dict):
|
|
3
|
+
super(Dottify, self).__init__()
|
|
4
|
+
for key, value in dic.items():
|
|
5
|
+
if isinstance(value, dict):
|
|
6
|
+
setattr(self, key, Dottify(value))
|
|
7
|
+
else:
|
|
8
|
+
setattr(self, key, value)
|
|
9
|
+
|
|
10
|
+
def __repr__(self):
|
|
11
|
+
return self.to_dict().__repr__()
|
|
12
|
+
|
|
13
|
+
def to_dict(self):
|
|
14
|
+
res = {}
|
|
15
|
+
for key, value in self.__dict__.items():
|
|
16
|
+
if isinstance(value, Dottify):
|
|
17
|
+
res[key] = value.to_dict()
|
|
18
|
+
else:
|
|
19
|
+
res[key] = value
|
|
20
|
+
return res
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: dottify
|
|
3
|
+
Version: 0.1
|
|
4
|
+
Summary: Dottify est une bibliothèque Python simple qui permet de convertir des dictionnaires en objets accessibles par attributs. Au lieu d'utiliser la syntaxe classique dict["key"], vous pouvez accéder aux valeurs d'un dictionnaire en utilisant la notation par points dict.key après avoir appliqué la transformation.
|
|
5
|
+
Home-page: https://github.com/nanaelie/dottify
|
|
6
|
+
Author: Nana Elie
|
|
7
|
+
Author-email: Nana Elie <elienana92@gmail.com>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2024 Nana Elie
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
|
|
30
|
+
Project-URL: Homepage, https://github.com/pypa/dottify
|
|
31
|
+
Project-URL: Issues, https://github.com/pypa/dottify/issues
|
|
32
|
+
Classifier: Programming Language :: Python :: 3
|
|
33
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
34
|
+
Classifier: Operating System :: OS Independent
|
|
35
|
+
Requires-Python: >=3.6
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
License-File: LICENSE
|
|
38
|
+
|
|
39
|
+
# Dottify
|
|
40
|
+
|
|
41
|
+
Dottify est une bibliothèque Python simple qui permet de convertir des dictionnaires en objets accessibles par attributs. Au lieu d'utiliser la syntaxe classique dict["key"], vous pouvez accéder aux valeurs d'un dictionnaire en utilisant la notation par points dict.key après avoir appliqué la transformation.
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
Vous pouvez installer Dottify via pip :
|
|
46
|
+
|
|
47
|
+
pip install dottify
|
|
48
|
+
|
|
49
|
+
## Utilisation
|
|
50
|
+
|
|
51
|
+
Voici un exemple d'utilisation de Dottify :
|
|
52
|
+
|
|
53
|
+
from Dottify import Dottify
|
|
54
|
+
|
|
55
|
+
persons = {
|
|
56
|
+
"Alice": {
|
|
57
|
+
"age": 30,
|
|
58
|
+
"city": "Paris",
|
|
59
|
+
"profession": "Engineer"
|
|
60
|
+
},
|
|
61
|
+
"Charlie": {
|
|
62
|
+
"age": 35,
|
|
63
|
+
"city": "Marseille",
|
|
64
|
+
"profession": "Doctor"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
persons = Dottify(persons)
|
|
69
|
+
|
|
70
|
+
print(persons.Alice.age)
|
|
71
|
+
|
|
72
|
+
## Fonctionnalités
|
|
73
|
+
|
|
74
|
+
- Conversion facile de dictionnaires en objets accessibles par attributs.
|
|
75
|
+
- Prise en charge des dictionnaires imbriqués.
|
|
76
|
+
|
|
77
|
+
## Contribuer
|
|
78
|
+
|
|
79
|
+
Les contributions sont les bienvenues ! N'hésitez pas à soumettre des demandes de tirage (pull requests) ou à ouvrir des problèmes (issues) sur le dépôt GitHub.
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
Distribué sous la licence MIT. Voir LICENSE pour plus d'informations.
|
|
84
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dottify
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "dottify"
|
|
3
|
+
version = "0.1"
|
|
4
|
+
authors = [
|
|
5
|
+
{ name="Nana Elie", email="elienana92@gmail.com" },
|
|
6
|
+
]
|
|
7
|
+
description = "Dottify est une bibliothèque Python simple qui permet de convertir des dictionnaires en objets accessibles par attributs. Au lieu d'utiliser la syntaxe classique dict[\"key\"], vous pouvez accéder aux valeurs d'un dictionnaire en utilisant la notation par points dict.key après avoir appliqué la transformation."
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.6"
|
|
10
|
+
license = { file = 'LICENSE' }
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Programming Language :: Python :: 3",
|
|
13
|
+
"License :: OSI Approved :: MIT License",
|
|
14
|
+
"Operating System :: OS Independent",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[project.urls]
|
|
18
|
+
Homepage = "https://github.com/pypa/dottify"
|
|
19
|
+
Issues = "https://github.com/pypa/dottify/issues"
|
dottify-0.1/setup.cfg
ADDED
dottify-0.1/setup.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name='dottify',
|
|
5
|
+
version='0.1',
|
|
6
|
+
packages=find_packages(),
|
|
7
|
+
description=(
|
|
8
|
+
'Dottify est une bibliothèque Python simple qui '
|
|
9
|
+
'permet de convertir des dictionnaires en objets '
|
|
10
|
+
'accessibles par attributs. Au lieu d\'utiliser '
|
|
11
|
+
'la syntaxe classique dict[\'key\'], vous pouvez '
|
|
12
|
+
'accéder aux valeurs d\'un dictionnaire en '
|
|
13
|
+
'utilisant la notation par points dict.key après '
|
|
14
|
+
'avoir appliqué la transformation.'
|
|
15
|
+
),
|
|
16
|
+
long_description=open('README.md').read(),
|
|
17
|
+
long_description_content_type='text/markdown',
|
|
18
|
+
author='Nana Elie',
|
|
19
|
+
author_email='elienana92@gmail.com',
|
|
20
|
+
url='https://github.com/nanaelie/dottify',
|
|
21
|
+
license='MIT',
|
|
22
|
+
classifiers=[
|
|
23
|
+
'Programming Language :: Python :: 3',
|
|
24
|
+
'License :: OSI Approved :: MIT License',
|
|
25
|
+
'Operating System :: OS Independent'
|
|
26
|
+
],
|
|
27
|
+
python_requires='>=3.6',
|
|
28
|
+
)
|