read, write, scan in json
Project description
Filez
Get Started
import filez
filez.ID = "MYPROJECTID" # http://magma-mc.net/projects.php/
filez.DEVELOPER = False # Prints To Console
Fwrite
thejson = {"hello": "World!"}
thejson2 = {"hello": "there!"}
filez.fwrite('testfile.json', json.dumps(thejson))
filez.fwrite('testfile2.json', json.dumps(thejson2))
Fread
print(filez.fread('testfile.json'))
# prints {"hello": "World!"}
print(filez.fread('testfile2.json'))
# prints {"hello": "there!"}
Scan
print(filez.scan('/'))
# prints ['testfile.json', 'testfile2.json']
print(filez.scan('/', True))
# prints {'testfile.json': '{"hello": "World!"}', 'testfile2.json': '{"hello": "there!"}'}
Send
thejson = {
'HelloWorld': 'Hi!',
'HelloThere': 'Hello!'
}
filez.fwrite('testfile3.json', json.dumps(thejson))
print(filez.fread('testfile3.json'))
# prints {'HelloWorld': 'Hi!', 'HelloThere': 'Hello!'}
filez.send('testfile3.json', 'Bonjour', 'HelloWorld')
print(filez.fread('testfile3.json'))
# prints {'HelloWorld': 'Bonjour!', 'HelloThere': 'Hello!'}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
filez_MagmaMc-1.0.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for filez_MagmaMc-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4c8a36a4c265fa46a6c90c4afcf01f96346f6a9d9357a7c06e02b523d845d6f |
|
MD5 | 8ec4d44b46a36799df7c8a3399548df0 |
|
BLAKE2b-256 | bf87669bba7fc33a216554afcd485ef5eb73b3e2941558f4a08eef6033752414 |