Saravanan666/pypi-org huggingface dataset:
Package: json-to-table
JSON-TO-TableConvert JSON File to CSV or XLSX File.InstallationInstall JSON-TO-Table using pip:pipinstalljson-to-tableUsage/Examples# Show Header$j2theaddata/example.json--n5nameagemarried0Mike18True1Tom25False2Jane20True3Bob30False4Alice22True# Convert JSON to CSV$j2tconvertdata/example.json# Convert JSON to XLSX$j2tconvertdata/example.json--txlsxAuthors@duyixian1234
Package: json-to-ubl-xml-transformer
JSON to UBL XML TransformerConverts JSON input files to PEPPOL BIS 3.0 Invoice UBL XML outputs and validates themFree software: MIT licenseDocumentation:https://json-to-ubl-xml-transformer.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.1 (2019-08-14)Minor patch release to fix the tagging.0.2.0 (2019-08-14)Removedxmlerdependency, simplified, and re-implemented the logic usingxmltodict.Added more tests, including for the CLI and increased tests coverage over 96%.Added Python 3.8 to supported versions.Removed Python 3.4 from supported versions.NOTE: This was supposed to be 0.1.4, but instead ofbumprevision patchI ranbumprevision minor, and since the PR is yet be pass TravisCI, I’ll do a follow-up
patch release.0.1.3 (2019-02-20)Fixed an issue with garbage data appearing from previous transformations (with deepcopy()).0.1.2 (2019-02-07)Working JSON transformation with multiple input files.0.1.0 (2018-10-30)First release on PyPI.
Package: jsontp
Script to generate a jsontreeforkeyand dumping thevalueof thekeybytree{"a":1,"b":2,"d":{"c":3}}#'root->d->c'{"a":1,"b":2,"d":[{"c":3}]}#'root->d->[0]->c'StartpipinstalljsontpExample (API)fromjsontpimportPageDataTreefromjsontp.utilsimportFileIOfromjsontp.configimportKeyinput_filepath='ranker_writer-ignore_me.json'output_filepath='ranker_writer_user_content-ignore_me.json'file_io=FileIO(input_filepath)file_data=file_io.load()pdt=PageDataTree(file_data)pdt_tree=pdt.tree_by_key(key='user',result_to=Key.SAVE)user_data=pdt.data_by_tree(next(pdt_tree))file_io.dump(user_data,output_filepath)Example (CLI)# Search for `key` (-k), filter by `key` (-fk)python-mjsontp-i<input_filepath>-kid-fkuser# Search for `key` (-k), filter by `key` (-fk), print the value for `tree`python-mjsontp-i<input_filepath>-kid-fkuser-o'*'# Print the value for `tree` (NOTE: `-o <output_filepath>` - to dump a value)python-mjsontp-i<input_filepath>-t'root -> props -> ... -> user'-o'*'Dependenciespip-V# 22.1.1python-V# 3.10.5pytest-V# 6.2.5Script structure# tree -I '__pycache__|env|build|jsontp.egg-info'
.
├── jsontp
│   ├── __init__.py
│   ├── __main__.py
│   ├── config.py
│   ├── utils.py
│   └── run.py
├── tests
│   ├── __init__.py
│   └── test_page_data_tree.py
├── data
│   ├── ranker_writer-ignore_me.json
│   └── ranker_writer_user_content-ignore_me.json
├── setup.py
├── LICENSE
├── README.md
├── UPDATES.txt
└── CONTRIBUTORS.mdTODOnested jsonjson in the listcheck for multiple keysreturn multiple keys (iterable result)unique multiple keys (not every single item in the list)check for keys by valueaccess to the data in the listadd and get the index fromtreehandle errors on searching for a non string keyfix errors on reading and writing to the json file without filenameno need to test for writingraising an errorFileNotFoundErrorfor not valid input filepathAPIFlagsCLIInputjson fileKeysearch:strfiltertreeby must havekey(-fk)multiple (-fk)filtertreeby must havevalue(-fv)multiple (-fv)result (config.py[Key]):print,returnLimitprintreturnOutputdump avalueto the file (-o <output_filepath>)append to the dump fileprint: '*'Coding process:https://youtu.be/DkBAIKMN7x0LicenseMITCopyright (c) 2022 srcown://ames0k0
Package: json-tracer
json-tracerA python library that generates a json file that traces the execution of a python program.It is heavily based on the backend ofpythontutor. All credits go to the original author Philip Guo.Can be run from command line or imported as a library.installpipinstalljson-tracerRunpython3-mtracerexamples/hello_world.pypublishpython-mbuild
python-mtwineuploaddist/*
Package: json-transform
JSON-TransformJson Transform allows you to simply convert your Python objects into a JSON document and vice versa.New? Here is some help:Getting StartedExampleSetup your object/entity.fromjsontransformimportfield,JSONObjectclassCustomer(JSONObject):def__init__(self):self._first_name=""# set a custom name for the field because by default it will be the function name@property@field("firstName")deffirst_name(self):returnself._first_name@first_name.setterdeffirst_name(self,value):self._first_name=valueInstantiate the object and encode it to a JSON document.fromjsontransformimportdumpd,dump,dumpsnew_customer=Customer()new_customer.first_name="Peter"# get a dict representation of the objectdumpd(new_customer)# result: {"firstName": "Peter"}# get an str with with our encoded objectdumps(new_customer)# result: '{"firstName": "Peter"}'# we can also encode the object directly into a filewithopen("new_customer.json","w")asf:dump(new_customer,f)JSON file (new_customer.json):{"firstName":"Peter"}Decode a JSON document.Code:fromjsontransformimportload,loadd,loads# we can decode our customer object from a JSON filewithopen("new_customer.json","r")asf:customer=load(f)# or a dictcustomer=loadd({"firstName":"Peter"})# or an str as wellcustomer=loads("{'firstName': 'Peter'}")customer.first_name# result: PeterMoreCheck out thedocumentation.Check out thehistoryCheck out theAPI design
Package: json-transporter
Overviewtportis a simple command line tool written in Python for
all your JSON transporting needs. Tools currently supported:Amazon S3Elastic SearchKafkaMongoDBHBaseQuickstartpip installjson-transporterAdd your specific connections to a.tportfile in your home directory.  For example,[elasticsearch]
host = http://myescluster.com:9200
ssl = false

[kafka]
host = http://mykafkabroker.com:9092

[s3]
access_key = youraccesskey
secret_key = yoursecretkeyTo view command line usage just typetport--helpConfigurationIftportdoes not find the relevant settings on the command line or the.tportfile, it will resort to the default settings for each tools.  For example,localhost:9200–> Elastic searchlocalhost:9092–> KafkaConnection settings such as thehostanddbcan also be
specified on the command line. Anything specified on the command line
will have presedence over settings in files. Order of precedence:command line.tportdefaults
Package: jsontree
Travis integration TBDjsontree is a simple module for quickly building manipulating and modifying
rich json data in python.Datetime objects are serialized out ti the ISO format which is easilly used
in javascript. ISO formatted datetime strings will be deserialized into
datetime objects.import jsontree
import datetime
data = jsontree.jsontree()
data.username = 'doug'
data.meta.date = datetime.datetime.now()
data.somethingelse = [1,2,3]

data['username'] == 'doug'

ser = jsontree.dumps(data)
backagain = jsontree.loads(ser)
cloned = jsontree.clone(data)
Package: jsontreeview
JsonTreeViewA simple python program for viewing JSON data more clearlyHow to usefromjsontreeviewimporttreeView...# Works for both dict and list typestreeView(obj,output="out.txt")# optional output file argument, default is stdoutExampleInput:{"glossary":{"title":"exampleglossary","GlossDiv":{"title":"S","GlossList":{"GlossEntry":{"ID":"SGML","SortAs":"SGML","GlossTerm":"StandardGeneralizedMarkupLanguage","Acronym":"SGML","Abbrev":"ISO8879:1986","GlossDef":{"para":"Ameta-markuplanguage,usedtocreatemarkuplanguagessuchasDocBook.","GlossSeeAlso":["GML","XML"]},"GlossSee":"markup"}}}}}Output:["glossary"]:
 -["title"]: str
 -["GlossDiv"]:
  --["title"]: str
  --["GlossList"]:
   ---["GlossEntry"]:
    ----["ID"]: str
    ----["SortAs"]: str
    ----["GlossTerm"]: str
    ----["Acronym"]: str
    ----["Abbrev"]: str
    ----["GlossDef"]:
     -----["para"]: str
     -----["GlossSeeAlso"]:
      ----->[0]: str
      ----->[1]: str
    ----["GlossSee"]: str
Package: json-trek
JSON TrekStar-Trek-flavored JSON dataGenerate fake JSON user data and lorem ipsum with a Star Trek theme.Fake User DataJSON Trek can generate user information for the following categories:UsernameEmail addressFirst nameLast nameAddressStreetCityStateCountryZip codeOccupationInstall$ pip install json-trekUsage>>>fromjson_trekimportJSONTrek>>>trek=JSONTrek()Methodsuser_profile(fields: list)If called without a list of fields,user_profilewill generate values for all fields.Username fieldsusernameemailfirst_namelast_nameoccupationaddress>>>trek.user_profile()# generate a user profile with all fields# the output here is formatted for readability{"username":"CyberneticImplant8","email":"SporeDrive48@sector68.fed","first_name":"Mirab","last_name":"Zshaar","occupation":"Xenoanthropologist","address":{"street":"665 N. Bomar Hwy.","city":"Nyria III","state":"RT","country":"Tessen III","zipcode":"43974-3953"}}>>>trek.user_profile(['username','email'])# or, pass a list of the desired user profile fields# the output here is formatted for readability{"username":"FluxIsolator81","email":"IsodyneRelay17@sector21.trk"}username()Generate a username consisting of two words and a number.>>>trek.username()"OrbitalTether35"email()Generate an email address. This is the same as the output from username ending with @sector0-100 and ending with .com, .trk, .edu, .fed, or .net>>>trek.email()"IconianCombadge48@sector63.net"get_name(first_or_last: str = 'both')Generate a first and last name together or each individually.>>>trek.name()"K'Kath Lor">>>trek.name('first')"Ilia">>>trek.name('last')"Xerius"occupation()Generate an occupation.>>>trek.occupation('first')"Chief Medical Officer"address()Generate an address with values for street, city, state, country and zipcode.>>>trek.address()# the output here is formatted for readability{"street":"75 Aldean St.","city":"Risa","state":"CR","country":"Ganalda IV","zipcode":"73691-9986"}ipsum(n: int = 30, lang: str = 'human')Args:n- minimum number of words to generate (some words come as pairs so the final string might be more thannwords.)lang- language in which to generate lorem ipsum text'human'(default)'klingon'>>>trek.ipsum()# generate 30 human words"Matter synthesizer? Holosuite hovercar runabout kantare? Kelva ithenite nuubari sensor mundahla taresia narva verdanis combadge ardana lothra leyron argosian. Burke? Xindus varro? Eridanus. Xelatian lyssarian hovercar? Cepheus nakan kurlan valakis shuttlecraft!">>>trek.ipsum(10,'klingon')# generate 10 klingon words"Cha. Jatlh jajvam duj nenchoh pov jaghmeyjaj? Chack toj posmoh!"Thanks toSTAPIfor providing a lot of the data used in this project.
Package: json-trim
django-jsonfielddjango-jsonfield is a reusable Django field that allows you to store validated JSON in your model.It silently takes care of serialization. To use, simply add the field to one of your models.New: Python 3 & Django 1.7 supported!PostgreSQL?: Use https://github.com/bradjasper/django-jsonfield/tree/postgresql for nowInstallpipinstalljsonfieldUsagefromdjango.dbimportmodelsfromjsonfieldimportJSONFieldclassMyModel(models.Model):json=JSONField()Advanced UsageBy default python deserializes json into dict objects. This behavior differs from the standard json behavior because python dicts do not have ordered keys.To overcome this limitation and keep the sort order of OrderedDict keys the deserialisation can be adjusted on model initialisation:importcollectionsclassMyModel(models.Model):json=JSONField(load_kwargs={'object_pairs_hook':collections.OrderedDict})Other Fieldsjsonfield.JSONCharFieldIf you need to use your JSON field in an index or other constraint, you can useJSONCharFieldwhich subclassesCharFieldinstead ofTextField. You’ll also need to specify amax_lengthparameter if you use this field.Compatibilitydjango-jsonfield supports Python 2.7-Python 3.3 and Django 1.4+Why doesn’t it support Python 2.6?You actually might be OK if you don’t use an OrderedDict, but there are some issues with the simplejson API that make it cumbersome to support.Why doesn’t it support Django 1.3?There was a bug that could only be fixed by a feature in Django 1.4.Read Moreif you’re interested in the details.Travis CIContactWeb:http://bradjasper.comTwitter:@bradjasperEmail:contact@bradjasper.comChangesv0.9.23, 9/3/2014 – Allowed tests to run in older versions of Djangov0.9.22, 7/10/2014 – Added Django 1.7 supportv0.9.21, 5/26/2014 – Added better support for Python 3 and tests for regex lookupsv0.9.20, 11/14/2013 – Fixed load_kwargs on form fields, added Django 1.6 to automated testsv0.9.19, 09/18/2013 – Fixed changes to django.six.with_metaclass that broke django-jsonfield for Django 1.6v0.9.18, 08/23/2013 – Fixed bugs with South datamigrationv0.9.17, 06/07/2013 – Fixed bugs in JSONCharField admin formv0.9.14/15/16, 04/29/2013 – Python 3 support added!v0.9.11/12/13, 03/26/2013 – PyPi changesv0.9.9/10/11, 03/21/2013 – PyPi changesv0.9.8, 03/21/2013 – Added support for native PostgreSQL JSON data typev0.9.7, 03/21/2013 – Fix bug #33 where JSONField didn’t correctly store some values inside of
strings
Package: json-txt
json txtWith the help of json txt you can use your txt file as a json file in a very simple wayDependenciesrefilemodpip install filemodcoloredpip install coloredInstallation and Usageusepip install json_txtMake sure that yourpipversion is updatedpip install --upgrade pip.Import the package:import json_txtUpdatesyou no longer need to use brackets to wite values in.some bugs are been solved and optimizations are made the librarynow "=" sign can be use in place of ":" is all your choiseFunctions in the moduleFirst load the data of the file using load_txt method you need to load
data every time you make changes to it as it is using txt as its main sourcejson_txt.load_txt(filename)extract_keys method helps you extract all the keys from the txt file , and returns them all in the listjson_txt.extract_keys(data).extract_values method helps you extract all the values from the specific keys in sequence from the txt file , and returns them in the list.json_txt.extract_keys(data).extract_data method helps you extract all the key value pairs from the txt file to dictjson_txt.extract_data(filename)edit_data method helps you edit key's value pair , it takes filename ,key, and a value to change.jason_txt.edit_data(filename,key,value_to_change)Helps you detect weather the var is int or not returs booljson_txt.number_detect(letter)Helps you convert text array to the real array
eg -
"[23,23,353]"-> [23,23,353].json_txt.generate_array(data)Run LocallyClone the projectgitclonehttps://github.com/kshitij1235/Json_txt/tree/main/distInstallpipinstalljson_txtList of Functionsfunctionsprocesssargsload_txtloads the txt datafilenameextract_keysextract key from datadataextract_valuesextract values from datadataextract_dataExtracts key value pairfilenameedit_dataEdit certain key valuesfilename,key,value_to_changeadd_dataHelp add data to the txtfilename,new key , new valuegenerate_arrayconverts string array to real arraydata(portion of the aray in string)Usage/Examplesway to write your txtsettings: active
values:244
meta:[23,52,53,work]
unit_test=True


Rules : 
1) Dont make any sub tree to write your data do it under one tree/{}.
2)dont use ] or [ inside arrays.
4)strictly use : or = when assigning values.codeimportjson_txt###printing basic dictornaryfile=json_txt.load_txt("main.txt")#load the txt fileprint(json_txt.extract_data(file))#printing key value pairs####extracting keys and values separatelyprint(json_txt.extract_keys(file))#printing the updated key valuesprint(json_txt.extract_values(file))#printing the updated values valuesOutputâœ“Test1passâœ“Test2passâœ“Test3passAllTestPassed{'settings':'active','values':244,'meta':[23,52,53,'work'],'unit_test':True}['settings','values','meta','unit_test']['active',244,[23,52,53,'work'],True]BadgesAuthors@kshitij1235website
Package: jsonty
Jsonty is an automatic JSON serialization/deseralization Python library for your custom classes.How it worksJsonty serialize and deserialize your custom objects by its annotations. All you have to do is define its attributes and make sure that are added in the constructorimportjsontyclassToy(jsonty.Model):name:struses:intdef__init__(self,name:str,uses:int):self.name=nameself.uses=uses# Object creationtoy:Toy=Toy(name='white car',uses=10)# Dumps operationtoy_json:str=toy.dumps()# { 'name': 'white car', 'uses': 10 }# Loads operationtoy_recoverying:Toy=Toy.loads(toy_json)# The json representation is converted into a Toy objectOperations supportedThere are a range of types that jsonty can handle such as:Basic data types:str, int, bool, numberIterables:List, Dict, Set, TupleModel InheritanceLinkspypi:https://pypi.org/project/jsonty/github:https://github.com/AlbertFX91/jsonty
Package: json-typed
TypedJSONTypedJSONis a Python class that enables the deserialization of JSON data into an object of a specified type with type safety and verification.FeaturesDeserialize JSON data into an object of a specified type.Verify that JSON data is compatible with the object's initializer signature.Handle nested objects and complex data structures.Serialize an instance of a class back to a JSON string.InstallationYou can useTypedJSONby including it in your Python project. It has no external dependencies.UsageImport theTypedJSONclass and theDeserializeExceptionexception:fromtyped_jsonimportTypedJSON,DeserializeExceptionDefine your Python classes that represent the data structure you want to deserialize from JSON.classStreet:def__init__(self,name:str,pos:int):self.name=nameself.pos=posclassAddress:def__init__(self,street:Street):self.street=streetclassPerson:def__init__(self,name:str,age:int,add:Address):self.name=nameself.age=ageself.address=addCreate aTypedJSONinstance with the target type:typed_json=TypedJSON(Person)Use theloadmethod to deserialize JSON data into an object of the specified type:json_data='{"name": "John", "age": 30, "add": {"street": {"name": "123 Main St", "pos": 42}}}'try:person_obj=typed_json.load(json_data)print(person_obj.name)print(person_obj.age)exceptDeserializeExceptionase:print(f"Deserialization error:{str(e)}")Use thedumpsmethod to serialize an object back to a JSON string:serialized_json=typed_json.dumps(person_obj)print(serialized_json)Error HandlingTypedJSONraises aDeserializeExceptionif there are issues during deserialization. You can catch this exception to handle errors gracefully.ContributionContributions are welcome! If you find issues or have suggestions for improvements, please open an issue or create a pull request on the GitHub repository.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: jsonui
UI to support JSON.jsonuiis a UI/GUI tool for working with JSON.FeaturesConvert Python dict into JSON.Show diffs between two JSONs.PrerequisitesPython 3.8+PyQT5(GPL v3license)QScintilla(GPL v3license)deepdiff(MITlicense)InstallationpipxpipxinstalljsonuipippipinstalljsonuiDocumentationDocumentation is available onRead the Docs.For guidelines on contributing check theContributor guidelines.TestsRun the tests with unittest:python-munittestjsonuiOr pytest:pytestLicenseMITSupportFor security issues contact me at the e-mail given in theAuthorsection.For overall issues, go toGitHub.AuthorArtur Barseghyan <artur.barseghyan@gmail.com>
Package: json-updater
json-updaterSetupTo import this library to your environment:pip install json-updaterTo import this function in your python code:from json_updater import update_jsonUseTo invoke:modified_input = update_json(input, changeset)Where,inputis either:a json-serializablestr, ora json-serializabledictchangesetis a json-serializablestrordict, or ajson_updater.ChangeSetobject.a json-serializablestrconforming to thejson_updater.ChangeSet,a json-serializabledictconforming to thejson_updater.ChangeSet, orajson_updater.ChangeSetobjectChangeSet SpecTheChangeSetdefinition can be foundhere; it consists of a set ofChangeobjects. EachChangecontains:anop(operation),apathwhich conforms tojsonpathsyntax,an optionalvalueparameter, used in certainoptypesan optionalindexparameter, used in certainoptypesChanges are applied in the order they are received.Operation TypesThe following operations are supported:Delete:"del"Deletes all json nodes specified in the changepathInit:"init"For all json nodes specified in the changepath, if that node doesn't exist, its value is initialized to the changevalue. Otherwise, ignores the existing node.Primarily used to ensure an array exists in the object tree before invoking Array Insert commands.Upsert:"ups"For all json nodes specified in the changepath, creates or replaces that node, setting the value to the changevalueReplace:"rpl"For all json nodes specified in the changepath, replaces that node, setting the value to the changevalueArray Insert:"arr_ins"For all json nodes specified in the changepath, which must be of type array, insert the changevalueat the providedindex.Ifindexisnull, appends to the end of the array.
Package: jsonuri
# JSONURI-PYThis package helps you convert Python dictionaries into an Gzip compressed, Base64 string for use as a HTTP GET request parameter and reverse it.An example of a practical application would be to send JSON data over HTTP GET, e.g. to a static resource small.png,and harvest the data from access logs instead of running real-time data collection.**Note**: You should avoid sending sensitive information using this mechanism, even if you're doing it over SSL.## Equivalent libs/packages:| Language | Repo                                ||----------|-------------------------------------|| JavaScript   | https://github.com/guidj/jsonuri-js |## Examples:```python>>> from jsonuri import jsonuri>>> data = {"age": 31, "name": "John", "account": {"id": 127, "regions": ["US", "SG"]}}>>> jsonuri.serialize(data, b64_encode=True, uri_encode=False)'H4sIANRnb1oC/6tWSkxPVbJSMDbUUVDKS8wFsZW88jPylID8xOTk/NK8EqBQtVJmCpAyNDIHChelpmfm5xUD+dFKocEghcHuSrG1tQCN2YKETAAAAA=='>>> ser = jsonuri.serialize(data, b64_encode=True, uri_encode=True)'H4sIAOdnb1oC%2F6tWSkxPVbJSMDbUUVDKS8wFsZW88jPylID8xOTk%2FNK8EqBQtVJmCpAyNDIHChelpmfm5xUD%2BdFKocEghcHuSrG1tQCN2YKETAAAAA%3D%3D'>>> jsonuri.deserialize(ser){'age': 31, 'name': 'John', 'account': {'id': 127, 'regions': ['US', 'SG']}}```