Edit text file, encrypt and decrypt with python!
Project description
TxtStr
Edit text file, encrypt and decrypt with python!
Explore the docs »
Report Bug
·
Request Feature
About The Project
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)** ```python 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)** ```python 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file txtstr-1.5.0.tar.gz.
File metadata
- Download URL: txtstr-1.5.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
921b5337b6a47151bc82025dbc64d53ef328d7bab46ad6b7ce96099164eb3da1
|
|
| MD5 |
579e535a0a0c46389e09b24433de2c68
|
|
| BLAKE2b-256 |
1bd97f4e26c23f299f039a9ac1e6274f51a4f8571cec6851cbd7569fce89220f
|
File details
Details for the file txtstr-1.5.0-py3-none-any.whl.
File metadata
- Download URL: txtstr-1.5.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92dd38fd0156914e92f85df44c077177245d4a4717affb1284fbf4bfb32ac311
|
|
| MD5 |
df4d0a2c15b5fcda9a303aa1427fedeb
|
|
| BLAKE2b-256 |
afb3a43e65cc11d76989b28b2aeecbce14ca173d27dd2b6d6d766548ffa3c3ae
|