filefy 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
filefy-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 MMdrza
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ include LICENSE
2
+ include README.md
3
+ include pyproject.toml
4
+
5
+ recursive-include filefy/templates *
6
+ recursive-include filefy/static *
7
+
8
+ global-exclude __pycache__
9
+ global-exclude *.py[cod]
10
+ global-exclude *.so
11
+ global-exclude .DS_Store
12
+ global-exclude .git*
13
+ global-exclude *.egg-info
filefy-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,239 @@
1
+ Metadata-Version: 2.4
2
+ Name: filefy
3
+ Version: 1.0.0
4
+ Summary: A professional web-based file manager with dark theme UI
5
+ Home-page: https://github.com/Pymmdrza/filefy
6
+ Author: Mmdrza
7
+ Author-email: Mmdrza <pymmdrza@gmail.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/Pymmdrza/filefy
10
+ Project-URL: Documentation, https://github.com/Pymmdrza/filefy#readme
11
+ Project-URL: Repository, https://github.com/Pymmdrza/filefy.git
12
+ Project-URL: Issues, https://github.com/Pymmdrza/filefy/issues
13
+ Project-URL: Changelog, https://github.com/Pymmdrza/filefy/releases
14
+ Keywords: file-manager,web-file-manager,flask,file-browser,remote-download,file-upload,dark-theme,file-explorer
15
+ Classifier: Development Status :: 5 - Production/Stable
16
+ Classifier: Environment :: Web Environment
17
+ Classifier: Framework :: Flask
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Intended Audience :: System Administrators
20
+ Classifier: Intended Audience :: End Users/Desktop
21
+ Classifier: License :: OSI Approved :: MIT License
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: Programming Language :: Python :: 3
24
+ Classifier: Programming Language :: Python :: 3.9
25
+ Classifier: Programming Language :: Python :: 3.10
26
+ Classifier: Programming Language :: Python :: 3.11
27
+ Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Programming Language :: Python :: 3.13
29
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
30
+ Classifier: Topic :: System :: Filesystems
31
+ Classifier: Topic :: Utilities
32
+ Requires-Python: >=3.8
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+ Requires-Dist: Flask>=2.3.0
36
+ Requires-Dist: Werkzeug>=2.3.0
37
+ Requires-Dist: requests>=2.28.0
38
+ Provides-Extra: dev
39
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
40
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
41
+ Requires-Dist: black>=23.0.0; extra == "dev"
42
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
43
+ Requires-Dist: build>=0.10.0; extra == "dev"
44
+ Requires-Dist: twine>=4.0.0; extra == "dev"
45
+ Dynamic: author
46
+ Dynamic: home-page
47
+ Dynamic: license-file
48
+ Dynamic: requires-python
49
+
50
+ # filefy
51
+
52
+ [![PyPI version](https://badge.fury.io/py/filefy.svg)](https://badge.fury.io/py/filefy)
53
+ [![Python](https://img.shields.io/pypi/pyversions/filefy.svg)](https://pypi.org/project/filefy/)
54
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
55
+
56
+ A **professional web-based file manager** written in Python with Flask. Features a beautiful dark theme UI, file upload/download, remote URL downloads with progress tracking, and comprehensive file operations.
57
+
58
+ ## Features
59
+
60
+ - **Professional Dark Theme UI** - Modern, responsive design
61
+ - **File Upload** - Drag & drop or click to upload files
62
+ - **File Download** - Download files directly from the browser
63
+ - **Remote Download** - Download files from URLs with progress tracking
64
+ - **File Operations** - Copy, move, rename, delete files and folders
65
+ - **Search** - Quick file search functionality
66
+ - **Context Menu** - Right-click menu with common actions
67
+ - **Keyboard Shortcuts** - Ctrl+C, Ctrl+V, F2, Del, F5
68
+ - **File Preview** - Preview text files and images
69
+ - **Disk Usage** - View disk space information
70
+
71
+ ## Quick Start
72
+
73
+ ### Install from PyPI (One Command!)
74
+
75
+ ```bash
76
+ pip install filefy
77
+ ```
78
+
79
+ ### Run the File Manager
80
+
81
+ ```bash
82
+ # Start with default settings (port 5000, home directory)
83
+ filefy
84
+
85
+ # Custom port
86
+ filefy --port 8080
87
+
88
+ # Custom directory
89
+ filefy --dir /path/to/directory
90
+
91
+ # Bind to specific host
92
+ filefy --host 127.0.0.1 --port 3000
93
+
94
+ # Enable debug mode
95
+ filefy --debug
96
+ ```
97
+
98
+ Then open your browser and go to: **http://localhost:5000**
99
+
100
+ ## Installation Methods
101
+
102
+ ### Method 1: pip (Recommended)
103
+
104
+ ```bash
105
+ pip install filefy
106
+ ```
107
+
108
+ ### Method 2: From Source
109
+
110
+ ```bash
111
+ git clone https://github.com/Pymmdrza/filefy.git
112
+ cd filefy
113
+ pip install -e .
114
+ ```
115
+
116
+ ### Method 3: Using pipx (Isolated Environment)
117
+
118
+ ```bash
119
+ pipx install filefy
120
+ ```
121
+
122
+ ## CLI Usage
123
+
124
+ ```
125
+ usage: filefy [-h] [-H HOST] [-p PORT] [-d DIR] [--debug] [-v]
126
+
127
+ filefy - Professional Web-Based File Manager
128
+
129
+ options:
130
+ -h, --help show this help message and exit
131
+ -H, --host HOST Host to bind the server to (default: 0.0.0.0)
132
+ -p, --port PORT Port to run the server on (default: 5000)
133
+ -d, --dir DIR Base directory for file management (default: home)
134
+ --debug Enable Flask debug mode
135
+ -v, --version show program's version number and exit
136
+
137
+ Examples:
138
+ filefy Start with default settings
139
+ filefy -p 8080 Use port 8080
140
+ filefy --host 127.0.0.1 Only allow local connections
141
+ filefy -d /home/user/files Set base directory
142
+ filefy --debug Enable Flask debug mode
143
+ ```
144
+
145
+ ## Python API
146
+
147
+ You can also use filefy programmatically:
148
+
149
+ ```python
150
+ from filefy import app, create_app
151
+ from filefy.server import run
152
+
153
+ # Option 1: Run with default settings
154
+ run()
155
+
156
+ # Option 2: Run with custom settings
157
+ run(host='127.0.0.1', port=8080, base_dir='/home/user/files')
158
+
159
+ # Option 3: Get Flask app for custom deployment
160
+ app = create_app(base_dir='/var/www/files')
161
+ # Use with gunicorn, waitress, etc.
162
+ ```
163
+
164
+ ### Using with Gunicorn
165
+
166
+ ```bash
167
+ pip install gunicorn
168
+ gunicorn "filefy:create_app()" -b 0.0.0.0:8000 -w 4
169
+ ```
170
+
171
+ ### Using with Waitress (Windows)
172
+
173
+ ```bash
174
+ pip install waitress
175
+ waitress-serve --listen=0.0.0.0:8000 filefy:app
176
+ ```
177
+
178
+ ## Keyboard Shortcuts
179
+
180
+ | Shortcut | Action |
181
+ |----------|--------|
182
+ | `Ctrl+C` | Copy selected item |
183
+ | `Ctrl+X` | Cut selected item |
184
+ | `Ctrl+V` | Paste item |
185
+ | `F2` | Rename selected item |
186
+ | `Delete` | Delete selected item |
187
+ | `F5` | Refresh current directory |
188
+ | `Escape` | Close modals / Deselect |
189
+
190
+ ## API Endpoints
191
+
192
+ The following REST API endpoints are available:
193
+
194
+ | Method | Endpoint | Description |
195
+ |--------|----------|-------------|
196
+ | `GET` | `/api/browse` | List directory contents |
197
+ | `POST` | `/api/upload` | Upload files |
198
+ | `GET` | `/api/download` | Download a file |
199
+ | `POST` | `/api/remote-download` | Start remote URL download |
200
+ | `GET` | `/api/download-tasks` | Get download progress |
201
+ | `POST` | `/api/copy` | Copy file/folder |
202
+ | `POST` | `/api/move` | Move file/folder |
203
+ | `POST` | `/api/delete` | Delete file/folder |
204
+ | `POST` | `/api/rename` | Rename file/folder |
205
+ | `POST` | `/api/create-folder` | Create new folder |
206
+ | `GET` | `/api/search` | Search files |
207
+ | `GET` | `/api/preview` | Preview file content |
208
+ | `GET` | `/api/file-info` | Get file information |
209
+ | `GET` | `/api/disk-usage` | Get disk usage stats |
210
+
211
+ ## Development
212
+
213
+ ### Setup Development Environment
214
+
215
+ ```bash
216
+ git clone https://github.com/Pymmdrza/filefy.git
217
+ cd filefy
218
+ python -m venv .venv
219
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
220
+ pip install -e ".[dev]"
221
+ ```
222
+
223
+ ## License
224
+
225
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
226
+
227
+ ## Contributing
228
+
229
+ Contributions are welcome! Please feel free to submit a Pull Request.
230
+
231
+ 1. Fork the repository
232
+ 2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
233
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
234
+ 4. Push to the branch (`git push origin feature/AmazingFeature`)
235
+ 5. Open a Pull Request
236
+
237
+ ---
238
+
239
+ Made by [MMdrza](https://github.com/Pymmdrza)
filefy-1.0.0/README.md ADDED
@@ -0,0 +1,190 @@
1
+ # filefy
2
+
3
+ [![PyPI version](https://badge.fury.io/py/filefy.svg)](https://badge.fury.io/py/filefy)
4
+ [![Python](https://img.shields.io/pypi/pyversions/filefy.svg)](https://pypi.org/project/filefy/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ A **professional web-based file manager** written in Python with Flask. Features a beautiful dark theme UI, file upload/download, remote URL downloads with progress tracking, and comprehensive file operations.
8
+
9
+ ## Features
10
+
11
+ - **Professional Dark Theme UI** - Modern, responsive design
12
+ - **File Upload** - Drag & drop or click to upload files
13
+ - **File Download** - Download files directly from the browser
14
+ - **Remote Download** - Download files from URLs with progress tracking
15
+ - **File Operations** - Copy, move, rename, delete files and folders
16
+ - **Search** - Quick file search functionality
17
+ - **Context Menu** - Right-click menu with common actions
18
+ - **Keyboard Shortcuts** - Ctrl+C, Ctrl+V, F2, Del, F5
19
+ - **File Preview** - Preview text files and images
20
+ - **Disk Usage** - View disk space information
21
+
22
+ ## Quick Start
23
+
24
+ ### Install from PyPI (One Command!)
25
+
26
+ ```bash
27
+ pip install filefy
28
+ ```
29
+
30
+ ### Run the File Manager
31
+
32
+ ```bash
33
+ # Start with default settings (port 5000, home directory)
34
+ filefy
35
+
36
+ # Custom port
37
+ filefy --port 8080
38
+
39
+ # Custom directory
40
+ filefy --dir /path/to/directory
41
+
42
+ # Bind to specific host
43
+ filefy --host 127.0.0.1 --port 3000
44
+
45
+ # Enable debug mode
46
+ filefy --debug
47
+ ```
48
+
49
+ Then open your browser and go to: **http://localhost:5000**
50
+
51
+ ## Installation Methods
52
+
53
+ ### Method 1: pip (Recommended)
54
+
55
+ ```bash
56
+ pip install filefy
57
+ ```
58
+
59
+ ### Method 2: From Source
60
+
61
+ ```bash
62
+ git clone https://github.com/Pymmdrza/filefy.git
63
+ cd filefy
64
+ pip install -e .
65
+ ```
66
+
67
+ ### Method 3: Using pipx (Isolated Environment)
68
+
69
+ ```bash
70
+ pipx install filefy
71
+ ```
72
+
73
+ ## CLI Usage
74
+
75
+ ```
76
+ usage: filefy [-h] [-H HOST] [-p PORT] [-d DIR] [--debug] [-v]
77
+
78
+ filefy - Professional Web-Based File Manager
79
+
80
+ options:
81
+ -h, --help show this help message and exit
82
+ -H, --host HOST Host to bind the server to (default: 0.0.0.0)
83
+ -p, --port PORT Port to run the server on (default: 5000)
84
+ -d, --dir DIR Base directory for file management (default: home)
85
+ --debug Enable Flask debug mode
86
+ -v, --version show program's version number and exit
87
+
88
+ Examples:
89
+ filefy Start with default settings
90
+ filefy -p 8080 Use port 8080
91
+ filefy --host 127.0.0.1 Only allow local connections
92
+ filefy -d /home/user/files Set base directory
93
+ filefy --debug Enable Flask debug mode
94
+ ```
95
+
96
+ ## Python API
97
+
98
+ You can also use filefy programmatically:
99
+
100
+ ```python
101
+ from filefy import app, create_app
102
+ from filefy.server import run
103
+
104
+ # Option 1: Run with default settings
105
+ run()
106
+
107
+ # Option 2: Run with custom settings
108
+ run(host='127.0.0.1', port=8080, base_dir='/home/user/files')
109
+
110
+ # Option 3: Get Flask app for custom deployment
111
+ app = create_app(base_dir='/var/www/files')
112
+ # Use with gunicorn, waitress, etc.
113
+ ```
114
+
115
+ ### Using with Gunicorn
116
+
117
+ ```bash
118
+ pip install gunicorn
119
+ gunicorn "filefy:create_app()" -b 0.0.0.0:8000 -w 4
120
+ ```
121
+
122
+ ### Using with Waitress (Windows)
123
+
124
+ ```bash
125
+ pip install waitress
126
+ waitress-serve --listen=0.0.0.0:8000 filefy:app
127
+ ```
128
+
129
+ ## Keyboard Shortcuts
130
+
131
+ | Shortcut | Action |
132
+ |----------|--------|
133
+ | `Ctrl+C` | Copy selected item |
134
+ | `Ctrl+X` | Cut selected item |
135
+ | `Ctrl+V` | Paste item |
136
+ | `F2` | Rename selected item |
137
+ | `Delete` | Delete selected item |
138
+ | `F5` | Refresh current directory |
139
+ | `Escape` | Close modals / Deselect |
140
+
141
+ ## API Endpoints
142
+
143
+ The following REST API endpoints are available:
144
+
145
+ | Method | Endpoint | Description |
146
+ |--------|----------|-------------|
147
+ | `GET` | `/api/browse` | List directory contents |
148
+ | `POST` | `/api/upload` | Upload files |
149
+ | `GET` | `/api/download` | Download a file |
150
+ | `POST` | `/api/remote-download` | Start remote URL download |
151
+ | `GET` | `/api/download-tasks` | Get download progress |
152
+ | `POST` | `/api/copy` | Copy file/folder |
153
+ | `POST` | `/api/move` | Move file/folder |
154
+ | `POST` | `/api/delete` | Delete file/folder |
155
+ | `POST` | `/api/rename` | Rename file/folder |
156
+ | `POST` | `/api/create-folder` | Create new folder |
157
+ | `GET` | `/api/search` | Search files |
158
+ | `GET` | `/api/preview` | Preview file content |
159
+ | `GET` | `/api/file-info` | Get file information |
160
+ | `GET` | `/api/disk-usage` | Get disk usage stats |
161
+
162
+ ## Development
163
+
164
+ ### Setup Development Environment
165
+
166
+ ```bash
167
+ git clone https://github.com/Pymmdrza/filefy.git
168
+ cd filefy
169
+ python -m venv .venv
170
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
171
+ pip install -e ".[dev]"
172
+ ```
173
+
174
+ ## License
175
+
176
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
177
+
178
+ ## Contributing
179
+
180
+ Contributions are welcome! Please feel free to submit a Pull Request.
181
+
182
+ 1. Fork the repository
183
+ 2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
184
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
185
+ 4. Push to the branch (`git push origin feature/AmazingFeature`)
186
+ 5. Open a Pull Request
187
+
188
+ ---
189
+
190
+ Made by [MMdrza](https://github.com/Pymmdrza)
@@ -0,0 +1,37 @@
1
+ """
2
+ Filefy - A Professional Web-Based File Manager
3
+
4
+ A powerful web-based file manager written in Python with Flask.
5
+ Features include file upload/download, remote URL downloads with progress,
6
+ copy, move, delete, rename operations, and a beautiful dark theme UI.
7
+
8
+ Usage:
9
+ $ filefy # Start with default settings
10
+ $ filefy --port 8080 # Start on port 8080
11
+ $ filefy --host 127.0.0.1 --port 3000 # Custom host and port
12
+ """
13
+
14
+ import sys
15
+ from pathlib import Path
16
+
17
+ # Add parent directory to path for config imports
18
+ BASE_DIR = Path(__file__).resolve().parent.parent
19
+ sys.path.insert(0, str(BASE_DIR))
20
+
21
+ # Try to get version from config
22
+ try:
23
+ from config import get_details
24
+ _details = get_details()
25
+ __version__ = _details.version
26
+ __author__ = _details.programmer
27
+ __email__ = _details.email
28
+ except ImportError:
29
+ __version__ = "1.0.0"
30
+ __author__ = "Mmdrza"
31
+ __email__ = "pymmdrza@gmail.com"
32
+
33
+ __license__ = "MIT"
34
+
35
+ from .server import app, create_app
36
+
37
+ __all__ = ["app", "create_app", "__version__"]
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Allow running the package directly with: python -m filefy
4
+ """
5
+
6
+ from .cli import main
7
+
8
+ if __name__ == "__main__":
9
+ main()
@@ -0,0 +1,106 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Filer CLI - Command Line Interface
4
+
5
+ Usage:
6
+ filefy # Start with defaults (port 5000, home directory)
7
+ filefy --port 8080 # Start on custom port
8
+ filefy --host 127.0.0.1 # Bind to specific host
9
+ filefy --dir /path/to/dir # Start with custom directory
10
+ filefy --debug # Enable debug mode
11
+ """
12
+
13
+ import argparse
14
+ import sys
15
+ from pathlib import Path
16
+
17
+ # Add parent directory to path for config imports
18
+ BASE_DIR = Path(__file__).resolve().parent.parent
19
+ sys.path.insert(0, str(BASE_DIR))
20
+
21
+ # Import configuration
22
+ try:
23
+ from config import get_settings, get_details
24
+ CONFIG_AVAILABLE = True
25
+ except ImportError:
26
+ CONFIG_AVAILABLE = False
27
+
28
+
29
+ def main():
30
+ """Main entry point for the CLI"""
31
+ # Get defaults from config if available
32
+ if CONFIG_AVAILABLE:
33
+ settings = get_settings()
34
+ details = get_details()
35
+ default_host = settings.host
36
+ default_port = settings.port
37
+ default_dir = settings.root_directory
38
+ version = details.version
39
+ else:
40
+ default_host = "0.0.0.0"
41
+ default_port = 5000
42
+ default_dir = None
43
+ version = "1.0.0"
44
+
45
+ parser = argparse.ArgumentParser(
46
+ prog="filefy",
47
+ description="šŸ—‚ļø Filefy - Professional Web-Based File Manager",
48
+ formatter_class=argparse.RawDescriptionHelpFormatter,
49
+ epilog="""
50
+ Examples:
51
+ filefy Start with default settings
52
+ filefy -p 8080 Use port 8080
53
+ filefy --host 127.0.0.1 Only allow local connections
54
+ filefy -d /home/user/files Set base directory
55
+ filefy --debug Enable Flask debug mode
56
+
57
+ Visit https://github.com/Pymmdrza/filefy for more information.
58
+ """,
59
+ )
60
+
61
+ parser.add_argument(
62
+ "-H",
63
+ "--host",
64
+ type=str,
65
+ default=default_host,
66
+ help=f"Host to bind the server to (default: {default_host})",
67
+ )
68
+
69
+ parser.add_argument(
70
+ "-p",
71
+ "--port",
72
+ type=int,
73
+ default=default_port,
74
+ help=f"Port to run the server on (default: {default_port})",
75
+ )
76
+
77
+ parser.add_argument(
78
+ "-d",
79
+ "--dir",
80
+ "--directory",
81
+ type=str,
82
+ default=default_dir,
83
+ dest="directory",
84
+ help="Base directory for file management (default: home directory)",
85
+ )
86
+
87
+ parser.add_argument("--debug", action="store_true", help="Enable Flask debug mode")
88
+
89
+ parser.add_argument("-v", "--version", action="version", version=f"%(prog)s {version}")
90
+
91
+ args = parser.parse_args()
92
+
93
+ try:
94
+ from .server import run
95
+
96
+ run(host=args.host, port=args.port, debug=args.debug, base_dir=args.directory)
97
+ except KeyboardInterrupt:
98
+ print("\n\nšŸ‘‹ Filefy stopped. Goodbye!")
99
+ sys.exit(0)
100
+ except Exception as e:
101
+ print(f"\nāŒ Error: {e}", file=sys.stderr)
102
+ sys.exit(1)
103
+
104
+
105
+ if __name__ == "__main__":
106
+ main()