FOR WRITE AND READ FILES, BASE64, CRIPTO, BINARY AND SERVER FILES WITH SOCKET WEB SERVER
Project description
# PyFileManager
**PyFileManager** is a lightweight Python 3 project that provides a unified interface for managing file operations through a simple, command-line-style programming model. It integrates functionality such as binary file handling, base64 encoding/decoding, cryptography (via Fernet), and lightweight socket-based file serving—all wrapped in a minimal, modular Python package.
---
## ✨ Features
- 📁 Stream reading/writing for files
- 📦 Binary file operations
- 🔐 Fernet-based encryption and decryption
- 🔤 Base64 encoding/decoding
- 🌐 Lightweight HTTP file server
- ⚡ Unified and efficient I/O interface
- ✅ Compatible with Python 2 and 3 (streamlined through IO abstraction)
- 🖥️ Designed for one-liner command-style operations
---
## 📦 Installation
```bash
pip install ostream-manager==2.0
🧰 Usage Overview
All features are accessed via modules within the stream_manager package.
📄 Stream File I/O
import stream_manager.io as IO
# Write to a file
writer = IO.OpenWriter("example.txt", "Hello, World!")
# Read from a file
reader = IO.OpenReader("example.txt")
print(reader) # Output: Hello, World!
💾 Binary File Handling
import stream_manager.binary as BINARY
# Write binary data
binary_writer = BINARY.OpenBinaryWriter("example.bin", b"\x00\x01\x02")
# Read binary data
binary_reader = BINARY.OpenBinaryReader("example.bin")
print(binary_reader)
🔤 Base64 Encoding/Decoding
import stream_manager.base64 as BASE64
# Encode and write Base64 content
b64_writer = BASE64.OpenBase64Writer("encoded.b64", "Some text to encode")
# Read and decode Base64 content
b64_reader = BASE64.OpenBase64Reader("encoded.b64")
print(b64_reader)
🔐 Cryptography with Fernet
import stream_manager.cripto as CRIPTO
# Generate encryption key
key = CRIPTO.GenerateCriptoKey()
# Encrypt content
encrypted = CRIPTO.CriptographyContent("Secret Message", key)
# Decrypt content
decrypted = CRIPTO.Uncripto(encrypted, key)
print(decrypted) # Output: Secret Message
🌍 File Server via HTTP
import stream_manager.server as SERVER
# Serve a file on localhost
SERVER.OpenFileServer("localhost", 80, "example.txt")
# Access from browser or curl: http://localhost:80/example.txt
🗂 Examples
You can find practical usage examples inside the module:
import stream_manager.examples
📚 Documentation & Manual Reference
The core functionality is structured as:
| Feature | Module | Method |
|---|---|---|
| File I/O | stream_manager.io |
OpenWriter(), OpenReader() |
| Binary I/O | stream_manager.binary |
OpenBinaryWriter(), OpenBinaryReader() |
| Base64 I/O | stream_manager.base64 |
OpenBase64Writer(), OpenBase64Reader() |
| Cryptography | stream_manager.cripto |
GenerateCriptoKey(), CriptographyContent(), Uncripto() |
| File Server | stream_manager.server |
OpenFileServer() |
👤 Author
Developed by asytrick 📧 Email: eusmool@gmail.com
📖 License
CREATIVE COMMONS ZERO LICENSE
💡 Notes
- Optimized for use in command-line or bash environments.
- Encourages low-latency file operations with minimal setup.
- Built to streamline file management operations in a Pythonic way.
Project details
Release history Release notifications | RSS feed
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 ostream_manager-2.0.tar.gz.
File metadata
- Download URL: ostream_manager-2.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17cd1ee03bfb1c3ad43b4df1d71b98bbef8f0ed30d662fc09ef9db9132b96a2a
|
|
| MD5 |
24b6c3ca4a7421a7f450475d41952e4a
|
|
| BLAKE2b-256 |
3759a102edc0afd0782b9d1afae632a67736c4892dbd1aec9845717a62fcdcb7
|
File details
Details for the file ostream_manager-2.0-py3-none-any.whl.
File metadata
- Download URL: ostream_manager-2.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b37b677ebef1efb7a87a69ace96b8ca192164e2734d1fbc5b4bb5ebfb1dd12b
|
|
| MD5 |
2b17e0ff66255c963734312f9855a0a9
|
|
| BLAKE2b-256 |
ad2cc57265db815651d85aff95a2163b909032f9add52ba44bf6e74f538ac375
|