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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spyll-1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file spyll-1.0.tar.gz.

File metadata

  • Download URL: spyll-1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for spyll-1.0.tar.gz
Algorithm Hash digest
SHA256 06e6d77713cb1f5a0e38ccea224081c944613c3d419a410f74ee76643f1631fd
MD5 b11bbbd82d211d42f6b7d30cd76c3bd6
BLAKE2b-256 45ef1262ceabda7ac504f55c4c8337aa0186e1c3d9f945e6b7b4cb7024673640

See more details on using hashes here.

File details

Details for the file spyll-1.0-py3-none-any.whl.

File metadata

  • Download URL: spyll-1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for spyll-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb9991dd560194ff39371078a5413a2f134e322cac0348b4ec00f3f193e40c68
MD5 9cedbfe543bbd24f55e42717474c4d8e
BLAKE2b-256 95c2406c504ada03b9db849fc87dd80c7d0b70440293525004104440f3da0fb7

See more details on using hashes here.

Supported by

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