semvec/pypi-packages huggingface dataset:
anserializer 1.2.2
A serializer/deserializer mechanism for simple and complex data structures

# anserializer

A module for serializing and deserializing complex data structures to/from json. It allows the user to (de)serialize a complex dictionary/list structure in one go by defining serializers/deserializers for arbitrary sets of classes.

Tested with python3.

Serializer can be utilized either as instantiated or non-instantiated.

## Install

`pip3 install anserializer`


## Examples

### Instantiated example
```
from anserializer import Serializer, DatetimeSerializer, ObjectSerializer

class MyObjectClass(object):
  pass

# instantiate the serializer
s  = s = Serializer([ DatetimeSerializer(), ObjectSerializer(MyObjectClass) ])

# create object
o = MyObjectClass()
print(o)

# serialize object
x = s.get_serialized(o)
print(x)

# deserialize object
o = s.get_deserialized(x)
print(o)
```

### Non-instantiated example
```
from anserializer import Serializer, DatetimeSerializer, ObjectSerializer

class MyObjectClass(object):
  pass

# put our list of serializer classes available for use into a variable
serializers = [ DatetimeSerializer(), ObjectSerializer(MyObjectClass) ]

# create object
o = MyObjectClass()
print(o)

# serialize object
x = Serializer.serialize(o, serializers)
print(x)

# deserialize object
o = Serializer.deserialize(x, serializers)
print(o)
```

### Allow children to be serialized by a serializer defined for their ancestor
```
from anserializer import Serializer, DatetimeSerializer, ObjectSerializer

class MyObjectClass(object):
  pass

# instantiate the serializer
s  = s = Serializer([ DatetimeSerializer(), ObjectSerializer(object) ], serialize_children=True)

# create object
o = MyObjectClass()
print(o)

# serialize object
x = s.get_serialized(o)
print(x)
```

### Use your own serializer
```
from anserializer import Serializer, DatetimeSerializer, ObjectSerializer, BaseSerializer

class MyObjectClass(object):
  pass

# create your serializer
class MySerializer(BaseSerializer):
  def __init__(self):
    super().__init__([MyObjectClass], '^!MyObjectClass\(\)$')

  def serialize(self, obj):
    # do the magic and return a serialized element 
    return { '!MyObjectClass()': { 
         # insert object data here
      }
    }

  def deserialize(self, serialized_obj):
    # do the magic and return an object with the data given in serialized format
    kwargs = {}
    return MyObjectClass(**kwargs)

# instantiate the serializer
s = Serializer([ DatetimeSerializer(), MySerializer(), ObjectSerializer(object) ])

# create object
o = MyObjectClass()
print(o)

# serialize object
x = s.get_serialized(o)
print(x)
```
stanpy 0.2.11
Small python package for structural analysis
Requires Python: >=3.6

.. image:: https://img.shields.io/pypi/v/stanpy.svg
        :target: https://pypi.python.org/pypi/stanpy

.. image:: https://readthedocs.org/projects/stanpy/badge/?version=latest
        :target: https://stanpy.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status

********
Overview
********

Structural analysis libary in python

* Free software: MIT license

Installation
============

::

    pip install stanpy

You can also install the in-development version with::

    pip install git+ssh://git@https://github.com/davidnaizhezhou/stanpy@main

Documentation
=============


https://stanpy-dev.david-zhou.org/


Development
===========

To run all the tests run::

    tox

Note, to combine the coverage data from all the tox environments run:
pjlog 0.1.9
Simple library for Logarithm with useful functions.

# PJLOG

This is a simple Logarithm Library to make working with Logarithm easy and with better useful functions.

## Installation

Run the following to install 
```python
pip install pjlog
```

## Usage

```python
import pjlog as pl

# Make a Logarithm Object 
a = pl.log(value = 100, base =10)

# Printing the Object 
print(a)

# To get value
print(a.Lget_value())

# To add
c = a + pl.log(value =4 , base =2 )
```