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.2.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for filez_MagmaMc-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 328add8617751c0f98d1f0a15b4dbe5ba438c4d2449e95fe19731c3f5c880080 |
|
MD5 | 40e853cccc6779bf3eadda1b2ccfdd20 |
|
BLAKE2b-256 | cf5fb508f3d0b0028148b3cc863f29d7b2f5009f4956d1fd22585365516f18c4 |