Skip to content

A version of JSON made specifically for python. NOTE: COMMANDS AND FILE STORAGE ARE DIFFERENT

License

Notifications You must be signed in to change notification settings

ProbablyComputingSquid/PYSON

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PYSON

Overview

The purpose of this project is to provide a python-based alternative to JSON. This is a (almost) fully functional JSON-inspired data management system!

Major news!

This project is now on pypi at https://pypi.org/project/pyson-data/ thanks to the hard work of @ComputingSquid

How to Use

THIS PROJECT IS NOT YET FINISHED! Documentation IS ONLY SHOWN FOR COMPLETED FEATURES. SOME FEATURES MAY BREAK DUE TO CONTINUED DEVELOPMENT. IF YOU SEE A PROBLEM, PLEASE LET ME KNOW!
Belive it or not, this project is surprisingly easy to use. The only thing you have to do is pip install pyson-data! From then, you can just import pyson-data, and use functions as normal! Support for other languages may come soon.
The PYSON format does NOT include a newline at the end of the file, files with a newline at the end will be considered invalid

List of Functions

getData()

Required inputs: filePath, datacall
Output: The item in the stored type at index datacall in file filePath

getWhole()

Required inputs: filePath
Output: A list of all datas in their respective types

updateData()

Required inputs: filePath, name, data
Updates entry name to contain value data
Output: Whether or not function call worked

isCompatible()

Required inputs: filePath
Outputs: Bool
Checks if a file is compatible with .cnf file format. Returns True if so, returns False if not.

Supported Types

There are 4 supported types: int, float, str, and list

An int is a whole number that can be any value
A str is a list of text (quotes not required)
A list is a list of values, which currently have to all be strings. List items are seperated by the (*) seperator. Currently there is no escaping support. I don't really know why you would use that value normally in a list.
A float is a decimal number, that can be any value

More supported types may be added.

Changelog

v0.1.0: Released PYSON to pypi v0.0.9: Liam did dumb fixes that din't really help (nasty) v0.0.8: Added updateData function v0.0.7: Fixed errors, refactored bad code v0.0.6: Added floats v0.0.5: Updated naming system, ported to github! v0.0.4: Added a function that checks if a file is compatible with .pyson file format. Fixed a bug in the write. Other general bug fixes.

v0.0.3: Added a write function! This is now (technicaally) a fully functioning data service!
v0.0.2: Added a read function for the whole file. Returns a list of all contents. This is actually getting pretty cool!
v0.0.1: Initial launch! Basic reading features for a .cnf file. Current compatible types are string, int, and list.

Dev comments

0.0.8: I (computingSquid) have had to resort to drastic measures to get my pull request approved. coolSchnoodle was forced to say "uwu" 0.0.5:
Wahoo! Porting to github!...oh shoot now I have to rename everything. 0.0.4:
HAHA I HAVE DONE IT! ... Wait no never mind I'm stupid - OmegaGodzilla66 Compatability checks are my nightmare. AAAAAA. - OmegaGodzilla66

About

A version of JSON made specifically for python. NOTE: COMMANDS AND FILE STORAGE ARE DIFFERENT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%