Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
s1zlibs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Oleksandr Barabash
s1zlibs
Commits
508863e9
Commit
508863e9
authored
Jan 18, 2021
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated to 1.0.9
parent
5a0acf18
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
15 deletions
+16
-15
meta_model.py
build/lib/s1zlibs/jsoner/models/meta_model.py
+13
-12
simple_serializer.py
build/lib/s1zlibs/jsoner/serializers/simple_serializer.py
+1
-1
s1zlibs-1.0.9-py3-none-any.whl
dist/s1zlibs-1.0.9-py3-none-any.whl
+0
-0
s1zlibs-1.0.9.tar.gz
dist/s1zlibs-1.0.9.tar.gz
+0
-0
install_tools.sh
install_tools.sh
+2
-2
No files found.
build/lib/s1zlibs/jsoner/models/meta_model.py
View file @
508863e9
...
@@ -27,24 +27,25 @@ class MetaModel(type):
...
@@ -27,24 +27,25 @@ class MetaModel(type):
if
hasattr
(
base
,
JSONER_DATA_FIELD
):
if
hasattr
(
base
,
JSONER_DATA_FIELD
):
jsoner_field_base
.
update
(
getattr
(
base
,
JSONER_DATA_FIELD
,
{}))
jsoner_field_base
.
update
(
getattr
(
base
,
JSONER_DATA_FIELD
,
{}))
def
build_property
(
v
):
def
get_value
(
self
):
return
v
.
get_value
()
def
set_value
(
self
,
value
):
return
v
.
set_value
(
value
)
def
del_value
(
self
):
return
v
.
del_value
()
return
property
(
get_value
,
set_value
,
del_value
)
# Setting the new class jsoner_field
# Setting the new class jsoner_field
for
k
,
v
in
attrs
.
items
():
for
k
,
v
in
attrs
.
items
():
if
isinstance
(
v
,
BaseField
):
if
isinstance
(
v
,
BaseField
):
# Here's the place where the magic comes!
# Here's the place where the magic comes!
jsoner_field_cls
[
k
]
=
v
jsoner_field_cls
[
k
]
=
v
setattr
(
new_cls
,
k
,
build_property
(
v
))
def
get_value
(
self
):
return
v
.
get_value
()
def
set_value
(
self
,
value
):
return
v
.
set_value
(
value
)
def
del_value
(
self
):
return
v
.
del_value
()
setattr
(
new_cls
,
k
,
property
(
get_value
,
set_value
,
del_value
))
jsoner_field
=
dict
()
jsoner_field
=
dict
()
jsoner_field
.
update
(
jsoner_field_base
)
jsoner_field
.
update
(
jsoner_field_base
)
jsoner_field
.
update
(
jsoner_field_cls
)
# overwrites base fields!
jsoner_field
.
update
(
jsoner_field_cls
)
# overwrites base fields!
...
...
build/lib/s1zlibs/jsoner/serializers/simple_serializer.py
View file @
508863e9
...
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
...
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
from
sys
import
version_info
from
sys
import
version_info
from
.base_serializer
import
BaseSerializer
from
.base_serializer
import
BaseSerializer
from
utils.log
import
Log
from
...
utils.log
import
Log
TAG
=
"SimpleSerializer"
TAG
=
"SimpleSerializer"
...
...
dist/s1zlibs-1.0.9-py3-none-any.whl
0 → 100644
View file @
508863e9
File added
dist/s1zlibs-1.0.9.tar.gz
View file @
508863e9
No preview for this file type
install_tools.sh
View file @
508863e9
#! /bin/bash
#! /bin/bash
python
-m
pip install
--user
--upgrade
setuptools
python
3
-m
pip install
--user
--upgrade
setuptools
python
-m
pip install
--user
--upgrade
wheel
python
3
-m
pip install
--user
--upgrade
wheel
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment