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.

  • 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.1.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.

txtstr-1.5.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: txtstr-1.5.1.tar.gz
  • Upload date:
  • Size: 4.4 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.1.tar.gz
Algorithm Hash digest
SHA256 6906fa14e91ec54b2dee80a2f5bfd2ddcf3a0735d9e49e08841bd34e0561dd04
MD5 981ddf2839366eb5fce101ad99548044
BLAKE2b-256 27d98545fce8a1df436d0a47225459a3bef0b883119a55d8d35f658f535f6bc6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: txtstr-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e788b46e4d0ff82ff008d1e5eb6dc83518ff39b5cb592c2feaa378921b793b2
MD5 727f1af5fd00a0df326cef6fda7d2adc
BLAKE2b-256 acb20325871a72f28d83a4701b16a27ce9a6db61b4e6b9035b644764788a29ec

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