semvec/pypi-packages huggingface dataset:
to-dict 0.0.7
to_dict
Requires Python: >=3.5

# jsoncodable

## Install
~~~~shell
pip install jsoncodable
# or
pip3 install jsoncodable
~~~~

## Usage
~~~~python
from jsoncodable import JSONCodable
import json

# ---------------------------------------- Any object to json dict ---------------------------------------- #

class Test1:
    def __init__(self, value: int):
        self.value1 = value
        self.value2 = value * 2
        self.values = [self.value1, self.value2]

class Test2(JSONCodable):
    def __init__(self, value: int):
        self.test1 = Test1(value)

test2 = Test2(5)
print(test2.dict)
# prints:
# 
# {'test1': <__main__.Test1 object at 0x1018199d0>}

print(json.dumps(test2.json, indent=4))
# prints:
# 
# {
#     "test1": {
#         "value1": 5,
#         "value2": 10,
#         "values": [
#             5,
#             10
#         ]
#     }
# }

# ---------------------------------------- Any json dict to object ---------------------------------------- #

class Test3(JSONCodable):
    pass

json_str = '{"name": "John Smith", "hometown": {"name": "New York", "id": 123}}'

print(Test3.from_json(json_str))
# prints:
# 
# JSONCodable(name='John Smith', hometown=JSONCodable(name='New York', id=123))

print(Test3.from_json(json.loads(json_str)))
# prints:
# 
# JSONCodable(name='John Smith', hometown=JSONCodable(name='New York', id=123))
~~~~
tegstats 0.0.5
Multiple and hierarchical regression and repeated measures ANOVA
Requires Python: >=3.6

# tegstats

The tegstats package includes teg_RMA and teg_regression

The function teg_regression runs a multiple regression analysis and provides the F-test for explained variance of the overall model and t-tests per coefficient. The function also lets you test significance of additional explained variance of a set of predictors added to a baseline model.

The function teg_RMA runs a repeated measures ANOVA.