Skip to main content

This is the simplest module for quick work with files.

Project description

Speed File Library

What is this?

The module allows you to work with files in just one line of code, without the need to manually open and close the file each time

Quick Guide

The module is based on the following structure:

f = open('data.txt')
data = f.readlines()
f.close()

Which Python provides by standard.


Using

Using the library is as simple and convenient as possible:

Let's import it first: First, import everything from the library (use the from ... import * construct).

Examples of all operations:

Writing the contents of an entire file to a variable using the read() function:

temp = File(path='test.txt').read()

Writing the contents of an entire file to a variable line by line using the readlines() function:

temp = File(path='test.txt').readlines()

Write only the first line from a file using the readline() function:

temp = File(path='test.txt').readline()

Writing data from a variable to a file using write() (overwriting or creating a file):

temp = "Test data"
File(path='test.txt', data=temp).write()

Adding data from a variable to a file using write() (or creating a file):

temp = "Test data"
File(path='test.txt', data=temp).add()

Developer

My site: link

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

speedfile-0.0.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

speedfile-0.0.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page