Skip to main content

Spyll is an Open-Source Python package that is aimed at making txt file management easier. It was made in python 3.7 and should work on all versions higher than 3.0.

Project description

Spyll 1.0

Welcome

Spyll is an Open-Source Python package that is aimed at making txt file management easier. It was made in python 3.7 and should work on all versions higher than 3.0.

Help commands

  • spyll.help()
  • spyll.changelog()

Features

spyll.write(file, text, split)

Writes to a specified text file with optional split which is only available for tuples and lists.

Example

import spyll

spyll.write(file="./folder/Hello_World.txt",text="This is a new text file!")
spyll.write(file="./folder/Goodbye_World.txt", text=["First Line", "Second Line", "Third Line"], split="\n")

spyll.read(file)

Simply reads text file to string

Example

import spyll

text = spyll.read(file="./folder/Hello_World.txt")
print(text)

spyll.search(file, text)

Checks to see if the file contains the specified value

Example

import spyll

if spyll.search(file="./folder/Hello_World.txt", "username"):
  print("Contains Username!")

Why use Spyll?

Spyll was created to make managing python text files much easier to work with. It's purpose is to turn multi-line code snippets into a single function.

Comparisons

Normal Python

sentence = ["Wow, ","I","Love","Python"]
text=""
with open("directory_to_file", "w") as file:
  for i in sentence:
    text+=f"{i} "
  file.write(text)

with open("directory_to_file", "r") as file:
  value = file.read()

with open("directory_to_file", "r") as file:
  value = file.read()
  if "username" in file:
    print("Username spotted!")

with open("directory_to_file", "r") as file:
  text = file.read()
  number = text.count("username")

Using Spyll

import spyll

sentence = ["Wow, ","I","Love","Python"]
spyll.write("directory_to_file", sentence, " ")

value = spyll.read("directory_to_file")

if spyll.search("directory_to_file", "username"):
  print("Username spotted!")

number = spyll.count("directory_to_file","username")

Contribute!

GitHub Page

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

spyll-1.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

spyll-1.0-py3-none-any.whl (6.2 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