Saravanan666/pypi-org huggingface dataset:
Package: jsm-transactional-ruler
Transactional RulerLib to post user events on transactional topicsRunning tests and lintdocker-compose up integration-testsdocker-compose up lintInstallationpip install jsm-transactional-rulerExample Usagefromjsm_transactional_ruler.enumsimportEventTypefromjsm_transactional_ruler.eventsimportEventfromjsm_transactional_ruler.publisherimportpublish_eventevent=Event(user_id="fake_id",event_type=EventType.T_EVENT_REGISTERED_USER,data={"email":"teste@juntossomosmais.com.br"})publish_event(event_trigger=event)The attributeevent_typeaccepts only events registered in theEventTypeenum.Thepublish_eventmethod accepts the optionalqueueandpublisher_parametersparameters to send to django-stomp:event=Event(user_id="fake_id",event_type=EventType.T_EVENT_REGISTERED_USER,data={"email":"teste@juntossomosmais.com.br"})publish_event(event_trigger=event,queue="/topic/VirtualTopic.user-update-transactions",persistent=False)VersioningThis lib follows thepypi version formatwith the convention of usingmajor.minor.patchversion.When to bump a patch version?Bump the patch version if you are doing a quick fix, nothing that changes the library functionality.When to bump the minor version?Bump the minor version if you are adding new functionality without breaking backwards compatibility. For example,
adding support to new events.When to bump the major version?Bump the major version if you are breaking backwards compatibility by adding new functionality or refactoring.ContributingThis project uses atrunk based developmentflow, so that we have only one long-lived branch (master).For any development, simply create a branch from it and follow the flow describedbelow.How to upload lib to PyPIIt is necessary to update the lib version using the command below:$poetryversionmajor|minor|patchAfter generating the version:Create a new branch with the files updated by PoetryOpen PR based on themasterbranchMerge PR into the masterGenerate a new release based on the version.Document to generate releaseAfter generating the new release "Github Actions" will upload the lib to PyPI using Poetry.Good job!
Package: js.namespace
js.namespaceIntroductionThis library provides a small javascript library to declare namespaces,
packaged forfanstatic.Create and use a namespaceOnce included, you can use namespace.declare(‘your.namespace’); to declare a
namespace. Then you can bind objects to that namespace by just assigning them
like your.namespace.your_funky_function = function(foo) {…};You are then able to access these objects from anywhere, without polluting the
global scope. Using dotted namespaces is a well known pattern to get a nice
and tidy codebase.How to use?You can importnamespacefromjs.namespaceandneedit where you want
these resources to be included on a page:>>> from js.namespace import namespace
>>> namespace.need()CHANGES0.1 (2013-05-15)Initial release.
Package: js.ngupload
js.nguploadIntroductionThis library packagesngUploadforfanstatic.This requires integration between your web framework andfanstatic,
and making sure that the original resources (shipped in theresourcesdirectory injs.ngupload) are published to some URL.How to use?You can importuploadfromjs.nguploadandneedit where you want
these resources to be included on a page:>>> from js.ngupload import upload
>>> upload.need()CHANGES0.3.0Upgrade ngUpload to 0.3.00.1Initial release.
Package: js.nvd3
js.nvd3IntroductionThis library packagesNVD3forfanstatic.This requires integration between your web framework andfanstatic,
and making sure that the original resources (shipped in theresourcesdirectory injs.nvd3) are published to some URL.How to use?You can importnvd3fromjs.nvd3andneedit where you want
these resources to be included on a page:>>> from js.nvd3 import nvd3
>>> nvd3.need()CHANGES1.8.1 (2015-08-07)Update to 1.8.1.1.7.1 (2015-08-07)Update to 1.7.1 (Community Merge) from novus/nvd3.1.1.15-beta (2014-11-11)Initial release.
Package: jsobj
jsobj provides JavaScript-Style Objects in Python. It is based on jsobject, but returns None if you try accessing non-existent keys instead of throwing an exception.Homepage and documentation:https://github.com/gkovacs/jsobjExample: “Hello World” with jsobjfromjsobjectimportObjectdata={"boolean":True,"null":None,"number":123,"objectA":{'a':'b','c':{'d':'e','f':{'g':'h'}}}}jso=Object(data)print(jso.boolean)# Trueprint(jso.null)# Noneprint(jso.number)# 123print(jso.objectA)# {'a': 'b', 'c': {'d': 'e', 'f': {'g': 'h'}}}print(jso.objectA.a)# bprint(jso.objectA.c.d)# eprint(jso.objectA.c.f.g)# hInstallation$ pip install jsobjLicenseMITCreditsGeza Kovacs. Based on jsobject by Marcin Wierzbanowski
Package: jsobject
jsobject: Objects for Humansjsobject is simple implementation JavaScript-Style Objects in Python. It is distributed as a single file module and has no dependencies other than thePython Standard Library.Homepage and documentation:https://mavier.github.io/jsobjectExample: “Hello World” with jsobjectfromjsobjectimportObjectdata={"boolean":True,"null":None,"number":123,"objectA":{'a':'b','c':{'d':'e','f':{'g':'h'}}}}jso=Object(data)print(jso.boolean)# Trueprint(jso.null)# Noneprint(jso.number)# 123print(jso.objectA)# {'a': 'b', 'c': {'d': 'e', 'f': {'g': 'h'}}}print(jso.objectA.a)# bprint(jso.objectA.c.d)# eprint(jso.objectA.c.f.g)# hDownload and InstallInstall the latest stable release withpip install jsobject,easy_install-Ujsobjector downloadjsobject.py(unstable) into your project directory. There are no hard dependencies other than the Python standard library. Jsobject runs withPython 2.6+ and 3.x.TestingTo run the tests use thenosetest.LicenseCode and documentation are available according to theMIT License.https://docs.python.org/3/library/json.htmlhttps://docs.python.org/2/library/functions.htmlhttps://docs.python.org/2/library/collections.htmlhttps://docs.python.org/2/library/json.html
Package: js.obviel
js.obvielIntroductionThis library packagesObvielforfanstatic.This requires integration between your web framework andfanstatic,
and making sure that the original resources (shipped in theresourcesdirectory injs.obviel) are published to some URL.LibrariesYou can the following resources fromjs.obviel:obviel(obviel.js)forms(obviel-forms.js)forms_datepicker(obviel-forms-datepicker.js)forms_autocomplete(obviel-forms-autocomplete)forms_nl(obviel-forms-nl.js)patterns(obviel-patterns.js)jgrowl(obviel-jgrowl.js)CHANGES0.11.2 (2012-06-25)alternative_separator support.0.11.1 (2012-01-14)Fix translation domain.My mistake, 0.11-1 did work. Ignore any previous evidence you ever saw of 0.11.1
before now.0.11-1 (2012-01-13)Something in distutils/setuptools/distribute doesn’t like the
‘resources’ directory being symlinked, it just doesn’t see it. As a
result this never was in the 0.11 release. Try again hacking a real
resources directory into existence temporarily for this release.0.11 (2012-01-13)Initial release.
Package: jsock
jsockKey-value-based, HMAC-signed, non-blocking sockets for PythonInstallationUsagePlease checkexample.py.Serializer/deserializer BenchmarkCheckbenchmark.py.json:send: 60005.29 op/srecv: 79790.10 op/stotal time: 1.459ssimplejson:send: 50552.37 op/srecv: 83004.80 op/stotal time: 1.591smsgpack:send: 93561.46 op/srecv: 145995.07 op/stotal time: 0.877spickle:send: 87664.16 op/srecv: 136931.65 op/stotal time:  0.935s
Package: jsodb
jsodbMine database realization that uses .json files.How to work with it?Instalation:python3 -m pip install jsodbBasic funcs:importjdbgetkeyval("key")# returns key valaddkey(key=val)# adds keys to jsonchangekey("key",val)# changes key to new valcreatejson("/path/to/file""""without .json""")# new .json file (without decorator)addtokey("key",int)# key += intsubfromkey("key",int)# key -= intaddmultikey("key",key=val,key2=val2)# new multi key {key: {"key": "val", "key2", "val2"}}@json("/path/to/file")# main decoratorTo use all that functions you need function with decorator, json file will be: opened, edited, saved.Basic usage:@json("profile.json")deffunc():print(getkeyval(balance))### 1changekey(balance,10)### {balance=10}addkey(deposit=100)### {balance=10, deposit=100}print(f"{getkeyval(balance)}\n{getkeyval(deposit)}")"""10100"""func()### changes applied
Package: jsog
# Serializing JavaScript Object Graphs with PythonThis Python module serializes and deserializes cyclic object graphs in the [JSOG format](https://github.com/jsog/jsog).## Source codeThe official repository is (https://github.com/jsog/jsog-python).## DownloadJsog is available in PyPI:$ pip install jsog## UsageThis code mimics the standardjsonpython package:import jsogstring = jsog.dumps(cyclicGraph);
cyclicGraph = jsog.loads(string);It can be used to convert between object graphs directly:import jsogjsogStructure = jsog.encode(cyclicGraph);       // has {‘@ref’: ‘ID’ } links instead of cycles
cyclicGraph = jsog.decode(jsogStructure);## AuthorJeff Schnitzer (jeff@infohazard.org)## LicenseThis software is provided under the [MIT license](http://opensource.org/licenses/MIT)
Package: jsom
JSOM - not quite JSON, but close enoughjsomis a simple and quick Python 3.7+ parser for terribly broken JSON.Installation$ pip install jsomUsagejsomworks like this:>>>importjsom>>>broken_json="{\"foo\": {bar: 1, 'baz':,}, bar: 1, baz: [1,2,3,],}")>>>jsom.JsomParser(ignore_warnings=jsom.ALL_WARNINGS).loads(broken_json){'foo':{'bar':1,'baz':None},'bar':1,'baz':[1,2,3]}jsomhappily gobbles up the following:unquoted keys and valuessingle-quoted stringstrailing commasempty values in objectsBy default, it will warn you whenever it sees one of those, but still parse it.It also doesn't give a shit about:Newlines in stringsStray backslashesYou will never get warned about those. ¯\_(ツ)_/¯Warnings are annoying, though, and to make matters worse, they slow the
parser down - so just pass in the list of warnings you wantjsomto be quiet
about in theignore_warningsparameter:parser = JsomParser(
    ignore_warnings=[jsom.SINGLE_QUOTED_STRING, jsom.EMPTY_OBJECT_VALUE]
)Or, if you prefer, just tell it to shut up completely, by passing injsom.ALL_WARNINGS.LICENSEjsomis distributed under the terms of theDo What The Fuck You Want To
Public License (WTFPL):DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
                    Version 2, December 2004 

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> 

 Everyone is permitted to copy and distribute verbatim or modified 
 copies of this license document, and changing it is allowed as long 
 as the name is changed. 

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 

  0. You just DO WHAT THE FUCK YOU WANT TO.
Package: jsomark
JSON <-> XML parsing and composing convention.What is jsomark?jsomark is a JSON to XML translation convention. jsomark accepts json in an
standardized format and converts it to XML. It should as well reverse the
operation and produce a JSON document from an XML one.UsageTocreate an XMLfrom aJSONdocument just use
thejson_to_xmlfunction:fromjsomarkimportjson_to_xmljson_data=b'{"hello": "world"}'xml_data=json_to_xml(json_data)assertxml_data==b'<hello>world</hello>'jsomarkalso supports more complex documents, likenested jsonstructures and Python json serializabledictionaries:fromjsomarkimportjson_to_xmljson_data={"Company":{"Name":"Knowark","Country":"Colombia"}}xml_data=json_to_xml(json_data)assertxml_data==(b'<Company><Name>Knowark</Name><Country>Colombia</Country></Company>')AttributesXML can carry more information (i.e. metadata) than JSON, that is why a
convention in the format of a converting json document is needed to match the
original XML semantics. Injsomark,attributesare defined with
thesymbol “&”:NoteAttribute values can only betextorbytesfromjsomarkimportjson_to_xmljson_data={"Device":{"Reference":{"&":{"ID":"XYZ2020","Serial":"S10987"}}}}xml_data=json_to_xml(json_data)assertxml_data==(b'<Device><Reference ID="XYZ2020" Serial="S10987"/></Device>')If the key with attributes also has atext content, then thesymbol “#”should be used to carry it:fromjsomarkimportjson_to_xmljson_data={"Employee":{"Company":{"&":{"VAT":"900123765"},"#":"Servagro"}}}xml_data=json_to_xml(json_data)assertxml_data==(b'<Employee><Company VAT="900123765">Servagro</Company></Employee>')NoteIf a JSON key doesn’t have attributes, its value becomes the text
of the resulting XML element as seen in the previous examples.ListsLists in the JSON document are interpreted asrepeating elementsinside the generated XML.fromjsomarkimportjson_to_xmljson_data={"Order":{"Line":[{"&":{"ID":"1"},"#":"Chocolate Ice Cream"},{"&":{"ID":"2"},"#":"Banana Split"},{"&":{"ID":"3"},"#":"Caramel Cake"}]}}xml_data=json_to_xml(json_data)assertxml_data==(b'<Order><Line ID="1">Chocolate Ice Cream</Line>'b'<Line ID="2">Banana Split</Line>'b'<Line ID="3">Caramel Cake</Line></Order>')NamespacesIn jsomark, namespaces are provided as aseparate dictionarywhose keys
are the prefixes that must be used in the json document itself. The default
namespace should be set in the‘None’key of the namespaces dictionary and
its keys in the json document don’t have to be prefixed:NoteDon’t miss the“:”separator in the non-default namespaced key
such as‘isbn:number’in the following example.fromjsomarkimportjson_to_xmlnamespaces={None:'urn:loc.gov:books','isbn':'urn:ISBN:0-395-36341-6'}json_data={"book":{"title":"Cheaper by the Dozen","isbn:number":1568491379}}xml_data=json_to_xml(json_data,namespaces=namespaces)assertxml_data==(b'<book xmlns="urn:loc.gov:books" xmlns:isbn="urn:ISBN:0-395-36341-6">'b'<title>Cheaper by the Dozen</title>'b'<isbn:number>1568491379</isbn:number></book>'
Package: json2
Json2PurposePython package which just wraps the default python json but with.
Additonally it can hanlde numpy arrays and torch tensors without throwing an exception.json2.load_fileandjson2.save_fileInstallationpip install json2Usageimport json2

a = json2.load_file(r'/home/user/myjson.json')
json2.dump_file(r'/home/user/myjson.json', a)
Package: json262
JSON encoder fully compliant with ECMA-262 specification.Free software: BSD licenseDocumentation:http://json262.readthedocs.org.FeaturesSupport for all objects that the Python stdlib’sjson.JSONEncodercan encode, plus:datetime.datetimedatetime.datedatetime.timedecimal.DecimalWorks on Python 2.6, 2.7, 3.3. Probably works on 3.4 and 3.5 but I haven’t set up tests for those with Tox yet.QuickstartUseJSON262Encoderas you would usejson.JSONEncoderfrom the Python standard library:>>> import datetime
>>> import json
>>> from json262 import JSON262Encoder

>>> json.dumps({'day': datetime.date(2010, 2, 17)}, cls=JSON262Encoder)
'{"day": "2010-02-17"}'History0.2.0 (2014-05-20)Full implementation with tests.Separateencodersmodule for encoder functions.Bump to Alpha.0.1.0 (2014-05-18)First release on PyPI.
Package: json2ast
json2astThe JSON to Python AST converter you never knew you neededDescriptionThis package is meant to work in the opposite direction of theast2jsonpackage which takes a Python AST object as input and produces a JSON structure as output. The one function,json2astexpects a Python dictionary created byast2jsonand returns a replication of the AST objects used to create that dictionary.Exampleimport ast
from ast2json import ast2json
from json2ast import json2ast

tree = ast.parse(open("test_scripts/test0.py").read())
json_tree = ast2json(tree)

ast_tree = json2ast(json_tree)
Package: json2bookmarks
json2bookmarksjson2bookmarkshelps to convert a bookmarks file in json format
to a html file.How it worksLet's take a sample json file,{"items":[{"title":"google","site":"http://www.google.com",},{"site":"http://web.whatsapp.com"}]}Notice that the bookmarks are inside"items"as a array of objectEvery bookmark can have"title","site","image"If the image is empty when you run the script on the file it will
generate a html file and also update you current file with thefaviconimage for the site for the"image"key.LicenseMIT
Package: json2cmake
json2cmakeconvertsJSON compilation databasefiles intoCMakefiles. The resultingCMakeLists.txtfile can then be used to
recompile the same object files with less overhead viaNinja, used as
an IDE project file forCLion, or for integration into a larger CMake
project.The output files only includeobject librarydefinitions, as acompile_commands.jsonfile typically doesn’t contain any linker
commands.Installationjson2cmakeis available as apippackage, and can be installed
like so:$ pip install --user json2cmakepipsiis a useful tool to keep scripts out of other Python
environments and virtualenvs:$ pipsi install json2cmakeUsageSimply runjson2cmakein the directory containingcompile_commands.json:$ json2cmake
$ cat CMakeLists.txt
cmake_minimum_required(VERSION 2.8.8)
project(autogenerated)
...Licensejson2cmakeis licensed under theMIT License.
Package: json2daisy
json2daisyUtility for converting JSON board definitions into valid,libDaisycompatible C++ board support files for theDaisy platform.InstallNote that this module is not intended as a standalone application at this time. You should not need to install it manually for most use cases.You can install this package with pip:python -m pip install json2daisyIf you'd like to build the package and install locally, you'll need thebuildpackage:python -m pip install buildOnce that's set up, navigate to the root directory of json2daisy and run:python3 -m build
python3 -m pip install dist/json2daisy-0.2.0.tar.gzIf pip complains about a missing file, make sure you've entered the correct version number in the archive path.UsageThis package can be used as a standalone program on the command line or as an imported module.On the command line:python -m json2daisy path/to/board_description.jsonAs a module:importjson2daisy# If you want to generate from an Electrosmith board:header_string,board_name,component_info,component_aliases=json2daisy.generate_header_from_board('field')# If you're supplying custom JSONheader_string,board_name,component_info,component_aliases=json2daisy.generate_header_from_file('path/to/board_description.json')As you can see, the two functions above will return a number of supplementary objects in addition to the header string. These provide detailed information for how to interact with the generated header. Thecomponent_infodictionary provides getters and setters for I/O, and thecomponent_aliasesdictionary provides valid aliases for everything incomponent_info.For examples of how to structure the board description, take a look at the JSON files insrc/json2daisy/resources.
Package: json2db
Json2DBPython3.6+Just need defined a json object, then you can save it in to a relational DB like MySQL PostgreSQL or other DB.Reason To Write This FrameWorkAlthough NoSQL Database like MongoDB is popular, we still need SQL DataBase for analyze data,
so this module is helping us store json to database, and help us build them in  db.Featuresupport mostly common database (MySQL,PostgreSQL,MSSQL,SQLite),just setdatabaselikeJFactory(database='mysql')See more intypesYou can setstr2colcontrol Database Column Type likeTextorVARCHARand other.You can see more
example intests/test_comom_factory.pySupport Different Style of database columnIf you want your db column likesome_thingstylefrom json2db import JFactory, ColumnFormat
JFactory(column_fmt=ColumnFormat.UNDERLINE)If you want your db column to besomeThingstyle, useColumnFormat.CAMELDefault we do nothing as the json format.Support Add a TimeStamp for your first tableSupport set table args for your each table initSupport add comment to your fieldJust Use{"field": {":my comment": "real value"}}, it can take themy commentto thisfieldSupport Control themax_depthof your json tablePS: min is0which meaning it only one table for all jsonSupport Restore your data to anther tableif your data liked = {"father_id": 1, "father_name": "father", "brother": {"brother_name": "jack"}, 'sons': [{"son_name": "aa"}}, You can save it to a
new table likefather - sonframework like{"father_id": 1, "brother_name": "jack", 'sons': [{"son_name": "aa", "father_name": "father"}]}PS: you movebrotherfield tofathertable, and movefatherfield tosontable,you can usemodel.store(data=new_d, is_press=True)See more sample please seetestsA Simple ExampleFor create_table ,store data and search datafrom json2db import JFactory, ColumnFormat
d = {"aa": 1, "bb": 2, "brother": {"name": "jack", "namess": [{"other": "jack"}]}, 'sons': [{"son_name": "aa"}]}

factory = JFactory()
model = factory.from_json(data=d, root_name="data")
model.create_tables_in_db()
model.store(data=d)
model.search(search_args=[("aa", 1)], limit=2)You can save your data to anysqlalchemysupport database like MySQL, PostgreSQL,Oracle,SQLite(Default stored if you not setdb_url) and so on.
Thedb_urlformat please see more detail seehttps://docs.sqlalchemy.org/en/latest/core/engines.html
Package: json2dynamo
Json to Dynamo TransformerThis tool transforms standard json files into dynamo mapping format.
Allowing the insertion of the outputed files via the aws cli.Installpip install json2dynamoUsagejson2dynamo --inputpath <path/to/json> --outputpath <path/to/output/folder>DevelopmentThis repo uses abakefile, to use the commands install it viapip install bake-cliOnce installed runbaketo see commands
Package: json2excel
[TOC]介绍json 转换成 excel 满足 报表业务需求为什么需要这个模块：1. 标准
2. 可能，真的很优雅。好的功能1. 标准化安装方法pip install json2excel调用案例fromjson2excelimportJson2Excelif__name__=='__main__':json2excel=Json2Excel(head_name_cols=["rank","name"])# print(json2excel.run('./test.json'))jsons=[{"student_no":1001,"name":"James","score":10,"class":"A-1","rank":1},{"student_no":1002,"name":"Tome","score":91,"class":"A-1","rank":2},]print(json2excel.run(jsons))参数介绍json2excel 控制参数format_handler  非必须 function/class  自定义json格式化函数，强烈推荐自定义
export_handler  非必须 class           自定义json输出成excel函数，一般不需要修改
export_dir      非必须 str             文件输出 **绝对** 路径，推荐自定义
head_name_cols  非必须 list            自定义excel表头排序，推荐自定义
kwargs          非必须 空              其他参数自定义json转换函数说明FormatHandler 可以是 类，或者函数。最重要的是把数据转换成如下格式。"""
输出目标格式：
注意，一定需要转换成这种格式，才能正常保存。
    [
        {
            "student_no": 1001,
            "name": "James",
            "score": 10,
            "class": "A-1",
            "rank": 1
        },
        {
            "student_no": 1002,
            "name": "Tome",
            "score": 91,
            "class": "A-1",
            "rank": 2
        },
    ]
"""classFormatHandler:def__init__(self,**kwargs):""""""def__call__(self,data_list:(list,dict)):""""""todo
Package: json2hive
json2hive is a command line utility that can automatically generate CREATE TABLE statements for
Hive tables backed by JSON data.FeaturesAutomatically infer schema of JSON data by analysing JSON recordsSupports external and managed Hive tablesCan be used as command line utility or programmaticallyInstallationYou can installjson2hiveusing pip:$pipinstalljson2hiveIt isstrongly recommendedthat you installjson2hiveinside avirtual environment!UsageOn the Command LineRun the following and follow the instructions:$json2hive--helpAs a libraryfromjson2hive.utilsimportinfer_schemafromjson2hive.generatorsimportgenerate_json_table_statement# infer schema from objects, these objects could be the result of json.loads(...)object1={'name':'John',age:25}object2={'name':'Mary',age:23}schema=infer_schema([object1,object2])# Generate CREATE TABLE statementstatement=generate_json_table_statement('example',schema,managed=True)print(statement)