Skip to content

Stop writing code for simple read and write functions in Python.

License

Notifications You must be signed in to change notification settings

npmontgomery/wread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wread

Stop writing code for simple read and write functions in Python.

MIT dependencies python

Wread simplifies common actions of pickle, txt, and csv, making life just a little easier for noobs like me and anyone else who wants to write a few lines less of code.

Installation

OS X & Linux:

Coming soon

pip install wread

Usage example

Wread includes three types of function: pickle, txt, and csv. Import all with from wread import *.

from wread import *
----
# Append a line to a text file, creates if doesnt exist.

append_txt_line(input_file, content)
----
# Checks if file exists, if not, writes content to new text file.

write_2_txt(input_file, content)
from wread import *
----
# Saves variable as pickle file.

save_pickle(output_file, variable)
----
# Loads pickle file variable

read_pickle(input_file)
from wread import *
----
# Load csv and output row content as lists in list of rows.

csv_list_rows(input_file)
----
# Load csv and output individual row as list.

def get_csv_row(input_file, line_number)
----  
# Appends items in list to new line of csv file. Makes file if does't exist.

csv_append(input_file, input_list)

Development setup

All dependent modules are already included in the standard library 😄

Release History

  • 0.0.1
    • Initial release (still a work in progress)

Meta

NPM – email me

Distributed under the MIT license. See LICENSE for more information.

Contributing

If you would like to contribute or have any suggestions on how to improve, just send me a private message!

About

Stop writing code for simple read and write functions in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages