A tiny but compact file writting library... if file writting create's dings, then oppose it with wings :)
Project description
Hey There!!!
I'm C.Amrit Subramanian the founder and author of this library
Let me just elucidate you.. about why I was too keen on constructing this.
Firstly.. I'm a student, currently pursuing higher education in Chennai, India... From Amrit Vidyalaya
Yep.. now hopefully, it's the right time to smash the reasons, why I manufactured this package.
Getting your grooves under the category of python might be simple as proclaimed... But When it's time to deal with ridiculous challenges like writing files[i.e csv, txt & bin] via python, that's gonna make you run frenzy.
With all due respect, in order to terminate excessive stress and chores from a programmer's life, I conceived this package to make ends meet right and work well mostly, under various aspects and phases.
If you are craving to find a package that could chop off unnecessary lines of code from your tremendous, massive project... Hey, congrats you're at the right destination to achieve your horizon. This is my motto & would certainly try my best to enhance and amplify this library...
Thanks For Supporting...
INSTRUCTIONS TO ABIDE:
this package consists of 6 functions that you can import and implement
i]write_txt(filename, fillers)
->this function help's you to create a txt file and append the elements you wanna, to the file you've provided.
->have to enter the file name first.
->then enter the string you wanna append in a single go.
ii]read_txt(filename, mode)
->this function helps you read the txt file via the read function.
->you should input p for printing the content or r for using the content for programming purposes in the function after the filename.
iii]write_csv(filename, total_columns, total_rows)
->this function help's you to create a csv file and append the elements you wanna, to the file you've provided.
->have to enter the file name first.
->then enter the total number of columns you wanna have in your csv file.
-> enter 0 if you are gonna append to a csv file that already exists else print the no. of columns you wanna have to create a new csv file and write the columns in it.
->then enter the total number of rows you wanna write to your csv file.
iv]read_csv(filename, mode)
->this function helps you read the csv file list by list.. via reader function from csv.
->you should input p for printing the content or r for using the content for programming purposes in the function after the filename.
v]write_bin(filename, *values)
->this function helps you to create and append or direct append to a pickled binary file.
->should first provide the file name you wanna create or append elements to.
->then write elements one after another with commas separated.. elements might be of whatever datatype you wanna have.
vi]read_bin(filename, mode)
->this function helps you to read a pickled binary file completely.
->you should input p for printing the content or r for using the content for programming purposes in the function after the filename.
after downloading the library you should import it using this command: 'import macromrit' or 'from macromrit import <the function you want>'
WHY IS THIS LIBRARY USEFUL & HANDY??:
_______________________________________________________________________
normal lines of code to write a txt file:
with open('filename.txt', 'a') as name:
print('hello world', file=name)
when you use this library to write a text file:
import macromrit
macromrit.write_txt('filename.txt', 'hello world')
_______________________________________________________________________
normal lines of code to write a csv file with 2 columns and 3 rows:
import csv
vals = [
['name', 'phone'],
['car', 'bike'],
['cycle', 'scooter']
]
with open('filename.csv', 'a', newline="") as writer:
main = csv.writer(writer, delimiter=',')
main.writerow(['column1', 'column2'])
main.writerows(vals)
when you use this library to write a csv file with 2 columns and 3 rows:
import macromrit
macromrit.write_csv('filename.csv', 2, 3)
_______________________________________________________________________
normal lines of code to write a binary file with 5 elements:
import pickle
x="hello"
y="hi"
z="bye"
a="clown"
c="pen"
with open('filename.bin', 'a') as writer:
pickle.dump(x, writer)
pickle.dump(y, writer)
pickle.dump(z, writer)
pickle.dump(a, writer)
pickle.dump(c, writer)
when you use this library to write a binary file with 5 elements:
import macromrit
macromrit.write_csv('filename.bin', "hello", "hi", 'bye', 'clown', 'pen')
_______________________________________________________________________
THANKS PYTHON ORGANISATION FOR MAKING MY DREAM COME TRUE
##########################################################################
cling me via instagram: https://www.instagram.com/amritsubramanian.c/
catch me through email: amritsubramanian.c@gmail.com
grab me on github: https://github.com/macromrit
###########################################################################
thanks for supporting :):):)
Author & Founder of macromrit library | C.Amrit Subramanian | a.k.a | Macromrit |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file macromrit-1.1.11.tar.gz.
File metadata
- Download URL: macromrit-1.1.11.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a5d158824735991738d60b1036d1eb92dceab64486eb7cf5276da0983ed262b
|
|
| MD5 |
9d6467874f27edfb9c02d5e7b9e418d0
|
|
| BLAKE2b-256 |
e6a153790fe15602ffd4bd12856c3766f63a73aa5d5ef1e6b6c5a965429bdb33
|
File details
Details for the file macromrit-1.1.11-py3-none-any.whl.
File metadata
- Download URL: macromrit-1.1.11-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f493fbd7c7e21d42bca9420ace73f8c471db2914e80ba13c563de8d37014f079
|
|
| MD5 |
523c106aa9ff25b597558eb7d6a11f5e
|
|
| BLAKE2b-256 |
79dd0508bf08086ed7dcf3509c5c84d1cadfa64df88555d6f0fe63cc69bda775
|