Skip to main content

Edit text file, encrypt and decrypt with python easily!

Project description


Logo

TxtStr

Edit text file, encrypt and decrypt with python!

Explore the docs »

Report Bug · Request Feature

About The Project

miniatura

If you want the explanation ask me in Twitch link

Getting Started

Prerequisites

You need to make sure you have installed the following modules. The requirements are installed automatically, but for any errors here are the commands to install each dependency

  • Cryptography

    pip install cryptography
    
  • Docx

    pip install docx
    
  • Fpdf

    pip install fpdf
    

Installation

pip install txtstr

Usage

  • txtstr.__init__()
    import txtstr
    
    txtstr.__init__()
    
    This starts all the functions to encrypt and decrypt the txt files, it creates a folder for you and the decryption key also starts the modules




  • txtstr.newkey(name)

    import txtstr
    
    txtstr.newkey(name)
    

    Create a new UNIQUE key to be able to encrypt and decrypt the files if you want someone to decrypt your files you have to pass them this key





  • txtstr.loadkey(name)
    import txtstr
    
    key = txtstr.loadkey(name)
    print(key)
    
    Here you can see your UNIQUE key to share it and use it in your programs when you think it is necessary




  • txtstr.encrypt(file, CUSTOM_KEY)
      import txtstr
      
      file = "file.txt"
      
      txtstr.encrypt(file,None)
      
    
    That this function can encrypt your file, the FILE section is where you can find the path of your .TXT file, CUSTOM_KEY if you put None it is because you want to use the default txtstr key, it is always advisable to create yours beforehand, to locate yours just type the name of the key (if it is in the same folder), but if it is in another folder, use the path of said file. Remember not to lose these keys since without this it will be IMPOSSIBLE to decrypt it




  • txtstr.decrypt(file, CUSTOM_KEY)
      import txtstr
    
      file = "file.txt"
      
      txtstr.decrypt(file, CUSTOM_KEY)
      
    
    Here you can decrypt your file, the FILE section is for the path of your file and the CUSTOM_KEY if you put None it is because you want to use the default txtstr key, it is always advisable to create yours beforehand, to locate yours just type the name of the key (if it is in the same folder), but if it is in another folder, use the path of said file




  • txtstr.write(text,name)
      import txtstr
    
      text = "the develpoer of txtstr is the best UnU"
      name = "isTRUE"
      
      txtstr.write(textname)
    




  • txtstr.read(file)

      import txtstr
    
      file = "file.txt"
      
      text = txtstr.read(file)
      print(text)
    




  • txtstr.rename(file,new_name)

      import txtstr
    
      file = "file.txt"
      new_name = "txtstr"
      
      txtstr.rename(file,new_name)
    

Experimental functions


  • txtstr.toword(file)

      import txtstr
    
      file = "file.txt"
      
      txtstr.toword(file)
    




  • txtstr.topdf(file)

      import txtstr
    
      file = "file.txt"
      
      txtstr.topdf(file)
    

License

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

Contact

Discord: PingüiMaya14#2055

WebSite: pingui.tk

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

txtstr-1.5.3.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

txtstr-1.5.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file txtstr-1.5.3.tar.gz.

File metadata

  • Download URL: txtstr-1.5.3.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for txtstr-1.5.3.tar.gz
Algorithm Hash digest
SHA256 5b7d9cec388b1f0d03fdf5f34b042a13918abf712bcf84f9c2ef905bcae50cc8
MD5 9e0df24f3359a7674569500d7ed085da
BLAKE2b-256 7344cd4d6a66110cd17a1ed88f0d4074a1901468300a3514c803c0d2ca399309

See more details on using hashes here.

File details

Details for the file txtstr-1.5.3-py3-none-any.whl.

File metadata

  • Download URL: txtstr-1.5.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for txtstr-1.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f3dc8cd9ea39a3e8cc65621ce3c0adde391ee38de37560031ba62094cabed71
MD5 5052790285ffbbdc7edc03eaac6181ba
BLAKE2b-256 37737077a3d5545348b41402af3b7c9b8a7b8a4dc6ae80885ac77d2563327155

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