Saravanan666/pypi-org huggingface dataset:
Package: serialdatalog
Serial Data LoggerA simple python script that logs the input received from a serial (USB) input to an SQLite database along with logging the time stamp (in the formatYYMMDDHHMMSS) of the received message.
Serial data logger expects the serial inputs to be comma separated.Installpip install serialdatalogUsageHere's an example using a Finometer pressure sensor.importloggingimportserialdatalogassdllogging.basicConfig(level=logging.INFO)# table_dict is formed of key : value pairs consisting of:#   sql_header : sql_data_type# If the number of headers is different to that read from the serial input then the input is not# logged.table_dict={"Elapsed_Time":"REAL","Finger_Pressure":"REAL","Height":"REAL","Arm_Pressure":"REAL","Finger_Plethysmogram":"REAL",}sdl.logger(table_dict,source="/dev/ttyACM0",dest="datalog.sqlite3",encoding='utf-8',timeout=10)
Package: serial_device2
This Python package (serial_device2) creates a class named
SerialDevice, which inherits from serial.Serial and adds methods to
it, like auto discovery of available serial ports in Linux, Windows,
and Mac OS X. The SerialDevice class can be used by itself, but it is
mostly intended to be a base class for other serial port devices with
higher level functions.Authors:Peter Polidoro <polidorop@janelia.hhmi.org>License:BSDExample Usage:from serial_device2 import SerialDevice, find_serial_device_ports
find_serial_device_ports() # Returns list of available serial ports
dev = SerialDevice() # Might automatically find device if one available
# if it is not found automatically, specify port directly
dev = SerialDevice(port='/dev/ttyUSB0') # Linux
dev = SerialDevice(port='/dev/tty.usbmodem262471') # Mac OS X
dev = SerialDevice(port='COM3') # Windows
dev.get_device_info()
from serial_device2 import SerialDevices
devs = SerialDevices()  # Might automatically find all available devices
# if they are not found automatically, specify ports to use
devs = SerialDevices(use_ports=['/dev/ttyUSB0','/dev/ttyUSB1']) # Linux
devs = SerialDevices(use_ports=['/dev/tty.usbmodem262471','/dev/tty.usbmodem262472']) # Mac OS X
devs = SerialDevices(use_ports=['COM3','COM4']) # Windows
devs.get_devices_info()
devs.sort_by_port()
dev = devs[0]
dev.get_device_info()
Package: serialdevicehandler
Serial Device HandlerExecute commands on a device via serial port.InstallingInstall usingpippipinstallserialdevicehandleror install it fromPyPiExamplefromserialdevicehandlerimport*device=serialdevicehandler(port="COM10",baudrate="115200")output=device.execute("help")print(output)SerialDeviceHandler()SerialDeviceHandler()is the core class within the library.Syntax:device=SerialDeviceHandler(port,baudrate,timeout)argumentdescriptionexpected typedefault valueportSpecifies the device portstrCOM1baudrateSpecifies the device baudratestr9600timeoutSpecifies the command timeoutint0.2sThere are some attributes for statistical and other purposes.attributedescriptionexpected typedefault valueis_openIndicates whether the serial port is openboolFalseeol_delimiterdefines the end-of-line separator for line readingstr\ntotal_rxstores the total bytes receivedint0total_txstores the total bytes transmittedint0SerialDeviceHandler.execute()Use theexecute()function to run a command.Syntax:device.execute(command,<optionalarguments>)argumentdescriptionexpected typedefault valuecommandDefines the command to be executedstrn/astdoutLive output while the command is runningboolFalseread_onlyread only executionboolFalsewrite_onlywrite only executionboolFalseSummarySerialDeviceHandler()execute()
Package: serial-for-controller
Serial-for-controllerWhat the library can do?Python library for data exchange with STM32 controller.How install?Old version package, with full name compatibilitypip install Adam-Serial-for-controllerNew version package, without name compatibilitypip install serial-for-controllerHow import?Old versionfrom Serial.serialPi import SerialUNew versionfrom serial_for_controller.SerialPi import SerialPiVersionsFor old package Adam-Serial-for-controller last version 0.2.1
For the new version Serial-for-controller, the countdown started from 0.0.1Thus, the functionality of version 0.2.1 corresponds to version 0.0.1 only with other names of functions and classes
Package: serialgrapher
serial-grapherUtility for graphing CSV data received over a serial portInstallpip install serialgrapherScreenshotUsageusage: serialgrapher [-h] [-p PORT] [-b BAUD_RATE] [-l LENGTH] [--dont-save]
                     [--rate-limit LIMIT] [--auto-scale-y] [--y-min MIN] [--y-max MAX]

Utility for graphing CSV data received over a serial port

optional arguments:
  -h, --help          show this help message and exit
  -p PORT             Serial port
  -b BAUD_RATE        Baud rate
  -l LENGTH           Number of data points to show on graph
  --dont-save         Don't save the data to a CSV file
  --rate-limit LIMIT  Maximum sample rate in samples/second
  --auto-scale-y      Automatically scale the y axis
  --y-min MIN         Minimum y value
  --y-max MAX         Maximum y valueCSV Format ExampleThis program receives data in standard CSV format from a serial port and expects a header row to be transmitted before the data.X,Y,Z
-0.90,2.20,9.73
-0.90,2.24,9.69
-0.98,2.16,9.77
-0.90,2.12,9.77
-0.86,2.24,9.73
...
Package: serialiJSON
SerialiJSONserialiJSONis a tool that allows you to convert complex objects to JSON only by inheriting the BaseSerializable class.Installationpython pip -m install serialiJSONUsageImportBaseSerializableclassfromserialiJSONimportBaseSerializableDefine your own class inheritingBaseSerializableclassmyClass(BaseSerializable):...myObject=myClass()Convert toJSONmyObject.toJson()An optionalindentcan be passed intotoJson()PropertyDescriptiontypedefaultindentset the indent to pretty-printedIntNone (most compact)Compatible TypesTypeList modestr[str]int[int]bool[bool]float[float]Real ExamplefromserialiJSONimportBaseSerializableclassItem(BaseSerializable):def__init__(self,itemName,isAlive):self.itemName=itemNameself.isAliva=isAliveclassPet(BaseSerializable):def__init__(self,name,age,favItems):self.name=nameself.age=ageself.favItems=favItemsclassHuman(BaseSerializable):def__init__(self,name,age,pets):self.name=nameself.age=ageself.pets=petsitems=[Item("snow ball",False),Item("tree",True)]pets=[Pet("Cat",12,items),Pet("Dog",4,items)]human=Human("name",90,pets)print(human.toJson(indent=4))pretty-printed{"name":"name","age":90,"pets":[{"name":"Cat","age":12,"favItems":[{"itemName":"snow ball","isAliva":false},{"itemName":"tree","isAliva":true}]},{"name":"Dog","age":4,"favItems":[{"itemName":"snow ball","isAliva":false},{"itemName":"tree","isAliva":true}]}]}non pretty-printed{"name":"name","age":90,"pets":[{"name":"Cat","age":12,"favItems":[{"itemName":"snow ball","isAliva":false},{"itemName":"tree","isAliva":true}]},{"name":"Dog","age":4,"favItems":[{"itemName":"snow ball","isAliva":false},{"itemName":"tree","isAliva":true}]}]}
Package: serialite
SerialiteSerialite is a library serializing and deserializing arbitrarily complex objects in Python. You
apply the@serializabledecorator to a dataclass to automatically createto_dataandfrom_datamethods using the type annotations. Or for more control, inherit from theSerializableMixinand
implement the class attribute__fields_serializer__. For even more control, inherit from the
abstract base classSerializerand implement theto_dataandfrom_datamethods directly.BasicsThe abstract base class isSerializer:classSerializer(Generic[Output]):deffrom_data(self,data:Json)->DeserializationSuccess[Output]:...defto_data(self,value:Output)->Json:...The class is generic in the type of the object that it serializes. The two abstract methodsfrom_dataandto_dataare the key to the whole design, which revolves around getting objects to
and from JSON-serializable data, which are objects constructed entirely ofbools,ints,floats,lists, anddicts. Such structures can be consumed byjson.dumpsto produce a string
and produced byjson.loadsafter consuming a string. By basing the serialization around JSON
serializable data, complex structures can be built up or torn down piece by piece while
alternatively building up complex error messages during deserialization which pinpoint the location
in the structure where the bad data exist.For new classes, it is recommended that theSerializerbe implemented on the class itself. There is
an abstract base classSerializablethat classes can inherit from to indicate this. There is a mixinSerializableMixinthat provides an implementation offrom_dataandto_datafor any class that
implements the__fields_serializerclass attribute.Fordataclasses, it is even easier. There is a decoratorserializablethat insertsSerializableMixininto the list of base classes after thedataclassdecorator has run and also
generates__fields_serializer__from the data class attributes.Finding the correct serializer for each type can be a pain, soserializer(cls: type) -> Serializeris provided as a convenience function. This is a single
dispatch function, which looks up the serializer registered for a particular type. For example,serializer(list[float])will returnListSerializer(FloatSerializer).
Package: serialix
Aboutserialixis a powerful and easy-to-use tool that provides unified API for various human-readable data serialization formats (likejson,yaml, etc). Due to the how this tool designed, all the supported formats share the identical base between each other, meaning that switching between them will be almost the same. This tool can also be extended for your purposes or even your own serialization format support.Usage exampleserialixis very easy to use:>>>fromserialiximportSerialix,JSON_Format# Import `Serialix` main class>>>default_settings={'version':'1.23.2'}# Specify the default values for our file>>>cfg=Serialix(JSON_Format,'./settings.json',default_settings)# Create serialix object for `json` format.# Local file will be automatically created.>>>cfg['version']# Read the `version` key'1.23.2'>>>cfg['version']='2.0.0'# Change the `version` key value>>>cfg['version']# Read the values of `version` key again'2.0.0'>>>cfg.commit()# Commit the changes to local `settings.json` fileSupported LanguagesList of currently supported languages parsers.Native SupportjsonExternal Supportujson(replacement for python built-in json parser)yaml(version <= 1.2)tomlLanguages, listed inNative Supportare supported by python without any external packages, whileExternal Supportrequires external packages to be installed. For more detailed information go here:Intallation GuideDocumentationAll information about this package installation and usage is located in documentationon this link
Package: serializable
serializableBase class with serialization methods for user-defined Python objectsUsageClasses which inherit fromSerializableare enabled with default implementations ofto_json,from_json,__reduce__(for pickling), and other serialization
helpers.A derived class must either:have a member data matching the name of each argument to__init__provide a user-definedto_dict()method which returns a dictionary whose keys match the arguments to__init__If you change the keyword arguments to a class which derives fromSerializablebut would like to be able to deserialize older JSON representations then you can define a class-level dictionary called_KEYWORD_ALIASESwhich maps old keywords to new names (orNoneif a keyword was removed).LimitationsSerializable objects must inherit fromSerializable, be tuples or namedtuples, be serializble primitive types such as dict, list, int, float, or str.The serialized representation of objects relies on reserved keywords (such as"__name__", and"__class__"), so dictionaries are expected to not contain any keys which begin with two underscores.
Package: serializabledict
Serializable DictA simple serializable dictLicense: Apache-2.0FeaturesSave dict data while it’s changed in realtime, so data will safety saved to file system if script crashed suddenly.Support context recursively save, data will only be saved during last __exit__.Usagefrom serializabledict.storage.yamlfilestorage import YamlFileStorage
from serializabledict import SerializableDict

storage = YamlFileStorage("./test.yml")
adict = SerializableDict(storage=storage)

# Auto save
adict.load()
adict["item"] = 13 # Saved to test.yml automaticly.

# Batch save, saved to test.yml after 'with' finish
with adict:
    adict["item"] = 14
    adict["item2"] = 15
    adict["item3"] = 16CreditsThis package was created withCookiecutterand thePyPackageTemplateproject template.History0.0.5 (2018-07-12)Dropped support of python 2.xRefactor setup routines0.0.4 (2018-06-25)First release on PyPI.
Package: serialization
Smart serialization library for Python languageFree software: MIT licenseDocumentation:https://serialization.readthedocs.org.FeaturesTODOHistory1.2.0 (2016-05-16)Add VersionedFormatable (forgotten to migrate from feat)Make it possible for the serializer to specify the VERSION_ATOM to be used.1.1.0 (2016-04-29)Simplify imports of interfaces.1.0.0 (2016-03-09)First release on PyPI.Separate fromhttps://github.com/f3at/feat
Package: serialized-data-interface
Serialized Data Interface Libraryhttps://pypi.org/project/serialized-data-interface/This libraries enables its user to create serialized and validated Juju Operator interfaces.An interface Schema will be defined through YAML e.g:v1:provides:type:objectproperties:access-key:type:stringnamespace:type:['string','null']port:type:numbersecret-key:type:stringsecure:type:booleanservice:type:stringrequired:-access-key-port-secret-key-secure-serviceWhen our charms interchange data, this library will validate the data through the schema on both
ends.UsageIn our charm metadata we would add the following lines to define our schema and the supported
versions:provides:oidc-client:interface:oidc-clientschema:https://raw.githubusercontent.com/canonical/operator-schemas/oidc-schemas/oidc-client.yamlversions:[v1]In this case SDI will pull the schema from Github during deployment. If we want to deploy our charm
in environments where Github isn't available we can pull the schemas during our build process by
adding some lines like this in ourtox.inifile:[testenv:build]
commands =
    charmcraft build
    python3 -m serialized_data_interface.local_sdiReal World ExampleMinio with Provider Interfacehttps://github.com/canonical/minio-operator/Argo Controller with Requirer Interface:https://github.com/canonical/argo-operators/TODOCurrently only provides data to App relations, should also support unit relations.
Package: serialized-redis-interface
Redis python interface that serializes all values using json, pickle, msgpack or a custom serializer.Getting StartedInstallationpip install serialized-redis-interfaceUsage>>>importserialized_redis>>>r=serialized_redis.JSONSerializedRedis(host='localhost',port=6379,db=0)>>>r.set('foo',{'test':'dict'})True>>>r.get('foo'){'test': 'dict'}>>>r=serialized_redis.PickleSerializedRedis(host='localhost',port=6379,db=0)>>>r.set('foo',{'test':'dict'})True>>>r.get('foo'){'test': 'dict'}>>>r=serialized_redis.MsgpackSerializedRedis(host='localhost',port=6379,db=0)>>>r.set('foo',{'test':'dict'})True>>>r.get('foo'){'test': 'dict'}serialized-redisextendsredis-pyand uses the same interface.Most commands, Piplines and PubSub are supported and take care of serializing and deserializing values.msgpackmust be installed in order to useMsgpackSerializedRedis.All strings are python str.LimitationsAs values are serialized, Redis operations that manipulate or extract data from values are not supported.SORT commands may not return correct order depending on the serializer used.ZSCAN and SSCAN MATCH option will only work for exact match.STRLENGTH and HSTRLENGTH will return the length of the serialized value.all lexicographical commands like ZLEXCOUNT, ZREMRANGEBYLEX and ZREVRANGEBYLEX are not supportedINCR is only supported with JSON serializerfields of Redis hashes are not serializedExtra Methodssmembers_as_list,sdiff_as_list,sinter_as_list,sunion_as_listcan be used when members of the redis
set may not be hashable once deserialized.>>>r=serialized_redis.JSONSerializedRedis()>>>r.sadd('myset',{'dict':1})1>>>r.smembers('myset')Traceback (most recent call last):File"<stdin>", line1, in<module>File"/home/michael/workspace/Origin_Nexus/serialized_redis/serialized_redis/__init__.py", line176, insmembersreturnset(super().smembers(*args,**kwargs))TypeError:unhashable type: 'dict'>>>r.smembers_as_list('myset')[{'dict': 1}]smart_getandsmart_setcan be used to retrieve and store python structure with their redis counterpart:pythonlistas redis LISTpythonsetas redis SETpythondictas redis HASH, fields will not be (de)serialized.Custom SerializerYou can use your own seriliazing and deserializing functions:>>>r=serialized_redis.SerializedRedis(serialization_fn=my_serializer,deserialization_fn=my_deserializer)If your deserializer function expects python 3 strings instead of bytes, you can adddecode_responses=Trueparameter.Decoding bytes to str when required is the responsability of the deserialization function.
Package: serializepy
serializepy: typed deserializationFile issues here:Issues trackerMotivationserializepy inspects the type-hints of self-assignments in class-constructors, and constructs the type from a given dictionary. The goal is to support this work recursively for large and complex (typed) hierarchies.InstallationInstall serializepy with pip:$ python3 -m pip install serializepyUsage# Example class hierarchy
class B():
    def __init__(self, b: int) -> None:
        self.b: int = b


class A():
    def __init__(self, a: int, b: B) -> None:
        self.a: int = a
        self.b: B = b

# Data that we want to fit the above hierarchy, possibly from json.load(..)
d = {
    'a': 1,
    'b': {
        'b': 2
    }
}

# Deserialization and assertion
obj: A = deserialize(A, d)
assert isinstance(obj, A)
assert obj.a == 1
assert isinstance(obj.b, B)
assert obj.b.b == 2Inheritance:class A():
    def __init__(self, a: int) -> None:
        self.a: int = a

class B(A):
    def __init__(self, a: int, b: int) -> None:
        super().__init__(a)
        self.b: int = b
d = {
    'a': 5,
    'b': 7
}

obj: B = deserialize(B, d)

assert isinstance(obj, B)
assert obj.a == 5
assert obj.b == 7Licenseserializepy is licensed under the terms of the MIT License (see the LICENSE file).
Package: serializer-data
serializer_dataserialize and deserialize objects in a simple waythere are two classes Serializer and Serializable, the first uses static methods while the other does not (see examples)Test 0from serializer_data.serializable import Serializabledata_set = {"key1": 3, "key2": 5}serial = Serializable("fileBinary.mm")serial.serialize(data_set)new_data_set = serial.deserialize()print(new_data_set)Test 1from serializer_data.serializer import Serializerdata_set = {"key1": 3, "key2": 5}serial = Serializer.serialize(data_set, "fileBinary.mm")new_data_set = Serializer.deserialize("fileBinary.mm")print(new_data_set)Installationpip install serializer_dataAuthorsBuscarino AntoninoLicenseGNU General Public License v3
Package: serial-j
Serial-JValidating and Serializing JSON data into Python object with minimal effort.FeaturesFor more detail, please go todocumentation page on Github.Serialize JSON / Python Dictionary data into Python object based on a compact dataschema.Automatically validate every JSON properties defined in theschemabased on varies additional options specified inschema.You are given convenient built-in methods that you can use to convert your data back to JSON encoded string or JSON / Python Dictionary.You have the flexibility of defining additional methods in your serializer class that utilize your data in anyway you want.
Package: serialkiller-plugins
About=====``serialkiller-plugins`` Plugins for serialkiller projectInstalling==========To install the latest release from `PyPI <http://pypi.python.org/pypi/serialkiller-plugins>`_::$ pip install serialkiller-pluginsTo install the latest development version from `GitHub <https://github.com/badele/serialkiller-plugins>`_::$ pip install git+git://github.com/badele/serialkiller-plugins.gitPlugins=======- Is online (ping)- Teleinformation (French electric provider)- Sunshine (calc sunrise & sunset)Script example==============For checking the sensors periodically, i use the supervisor application, it can restart the application if it crashes.Supervisor install.::# Debian$ apt-get install supervisor# Archlinux$ pacman -S supervisorThe check sensors supervisor configuration.::[program:check_sensors]command=~/.virtualenvs/serialkiller/bin/python /usr/local/bin/check_sensors.pyuser=badeleautostart=trueautorestart=trueActive and start supervisor.::# Debian$ /etc/init.d/supervisor start# Archlinux$ systemctl enable supvervisord$ systemctl start supvervisord# Show status$ supervisorctl statuscheck_sensors                    RUNNING    pid 1306, uptime 23:48:04``/usr/local/bin/check_sensors.py`` script example.::#!/usr/bin/env python# -*- coding: utf-8 -*-import osimport timefrom skplugins import addValuePlugin, addEventPlugin, addValue, addEventfrom skplugins.network.ping import pingfrom skplugins.weather.sunshine import sunshineserver = '192.168.1.1'while True:# Check sunshineresult = sunshine(latitude="43:36:43", longitude="3:53:38", elevation=8)addValuePlugin(server, 'city:weather:sunshine', result)# Check internet connexionresult = ping(destination="8.8.8.8", count=1)addValuePlugin(server, 'livingroom:internet:available', result)# Check webcamresult = ping(destination="192.168.1.2", count=1)addValuePlugin(server, 'livingroom:axis:online', result)# Check my computerresult = ping(destination="192.168.1.3", count=1)addValuePlugin(server, 'bedroom:hp2012:online', result)# Check teleinfo informationsresult = teleinfo(dev='/dev/teleinfo')if 'HCHC' in result.results:addValue(server, 'washroom:teleinfo:hchc', result.types['HCHC'], result.results['HCHC'])if 'HCHP' in result.results:addValue(server, 'washroom:teleinfo:hchp', result.types['HCHP'], result.results['HCHP'])if 'IINST' in result.results:addValue(server, 'washroom:teleinfo:iinst', result.types['IINST'], result.results['IINST'])if 'ISOUSC' in result.results:addValue(server, 'washroom:teleinfo:isousc', result.types['ISOUSC'], result.results['ISOUSC'])if 'PAPP' in result.results:addValue(server, 'washroom:teleinfo:papp', result.types['PAPP'], result.results['PAPP'])#Sleeptime.sleep(5)Changelog=========Version 0.0.2 (2014-02-08)--------------------------* Add metar plugin* Add vigilance plugin (Meteo France)* Add cache system* Add process plugin* Add sunshine plugin* Add ping plugin* Add teleinfo pluginVersion 0.0.1 (2013-01-11)--------------------------* First version