semvec/pypi-packages huggingface dataset:
Brestart2 0.1
restart functions at breakpoint
License: MIT
Requires Python: >=3.4

## Function:
this module make it easy for any python script recorde results after some time-consuming task;
so if some unpredictable errors happened and crashed your script, it can pass the funcs that has already 
successfully finished, just begin from the breakpoint;

## Method:
a.  before run your task,import this module, and at the fist run step --  Brestart.preRunCheck() ;
check if something wrong ,and wether it needs breakpoint restart;    
b.  use @Brestart.logFunc to decorate the functions that cost much time,make it a recorde point;    
c.  finally Brestart.end() at the last run step ,can clear temp log and do not affect next run.
deeply 1.0.3
Deeply allow you to make your dataclasses more functional
License: MIT
Keywords: web,dataclass,dict,api,easy,json

Deeply - Make your dataclasses more functional
==============================================

Using this package you can do a deep conversion of your dataclass to a
dictionary and initialize it from dict.

Getting it
~~~~~~~~~~

To download deeply, either fork this github repo or simply use PyPI via
pip.

.. code:: sh

   $ pip install deeply

Usage
-----

1 - Import

.. code:: python

   from deeply import Deeply
   from dataclasses import dataclass

2 - Define your data classes with the following inheritance:

.. code:: python

   @dataclass
   class A(Deeply):
       a1: int
       a2: int


   @dataclass
   class B(Deeply):
       b1: str
       b2: str

   @dataclass
   class C(Deeply):
       a: A
       b: B

3 - Create an instance of the class and you can already use it:

.. code:: python

   c = C(A(1, 2), B('foo', 'bar'))

   c.to_web()
   # {'a': {'a1': 1, 'a2': 2}, 'b': {'b1': 'foo', 'b2': 'bar'}}

4 - You can also initialize your class from a dictionary:

.. code:: python

   c = C.init_from_dict({
       'a': {
           'a1': 1,
           'a2': 2
       }, 
       'b': {
           'b1': 'foo',
           'b2': 'bar'
       }
   })

   # C(a=A(a1=1, a2=2), b=B(b1='foo', b2='bar'))

5 - And finally: you can set your own conversion rules in deep dict.

.. code:: python

   Deeply.rules: List[Tuple[Callable[[T], bool], Callable[[T], Any]]] = [
           (lambda obj: hasattr(obj, 'isoformat'), lambda obj: obj.isoformat()),
       ]