Make Your txt work like json
Project description
json txt
With the help of json txt you can use your txt file as a json file in a very simple way
Installation and Usage
- use
pip install json_txt
- Make sure that your
pip
version is updatedpip install --upgrade pip
. - Select the correct package for your environment:
- Import the package:
import json_txt
Functions in the module
-
extract_data method helps you extract all the key value pairs from the txt file to dict
json_txt.extract_data(filename)
-
Helps you detect weather the var is int or not returs bool
json_txt.number_detect(letter)
Run Locally
Clone the project
git clone https://github.com/kshitij1235/Json_txt/tree/main/dist
Install
pip install json_txt
List of Functions
functions | processs | args |
---|---|---|
extract_data(filename) | Extracts key value pair | filename |
Usage/Examples
way to write your txt
{
sence:3
height:5
marks:23
}
//dont make any sub tree to write your data do it under one tree/{}
code
import json_txt
json_txt.extract_data('demo_file.txt')
Output
{'sence': 3, 'height': 5, 'marks': 23}
Badges
Authors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
json_txt-1.0.0.tar.gz
(3.2 kB
view hashes)