putplace 0.5.1__tar.gz → 0.5.6__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.
- {putplace-0.5.1 → putplace-0.5.6}/CLAUDE.md +34 -0
- {putplace-0.5.1 → putplace-0.5.6}/PKG-INFO +30 -7
- {putplace-0.5.1 → putplace-0.5.6}/README.md +28 -6
- putplace-0.5.6/SECURITY_AUDIT_REPORT.md +576 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/AWS_CREDENTIALS_SETUP.md +30 -1
- {putplace-0.5.1 → putplace-0.5.6}/pyproject.toml +3 -2
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/main.py +18 -5
- putplace-0.5.1/src/putplace/scripts/configure.py → putplace-0.5.6/src/putplace/scripts/putplace_configure.py +229 -27
- putplace-0.5.6/src/putplace/static/README.md +67 -0
- putplace-0.5.6/src/putplace/static/css/.gitkeep +1 -0
- putplace-0.5.6/src/putplace/static/images/.gitkeep +5 -0
- putplace-0.5.6/src/putplace/static/images/LOGO_USAGE.md +152 -0
- putplace-0.5.6/src/putplace/static/images/putplace-logo.svg +25 -0
- putplace-0.5.6/src/putplace/static/js/.gitkeep +1 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/version.py +1 -1
- {putplace-0.5.1 → putplace-0.5.6}/tasks.py +19 -3
- {putplace-0.5.1 → putplace-0.5.6}/tests/conftest.py +7 -2
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_api.py +15 -3
- putplace-0.5.6/tests/test_configure.py +259 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_console_scripts.py +23 -2
- {putplace-0.5.1 → putplace-0.5.6}/.env.example +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/.github/PYPI_PUBLISHING_SETUP.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/.github/workflows/publish-pypi.yml +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/.github/workflows/publish-testpypi.yml +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/.gitignore +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/.readthedocs.yaml +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/CHANGELOG.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/CONFIG.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/FILE_UPLOAD_WORKFLOW.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/LICENSE +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/OAUTH_SETUP.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/READTHEDOCS_SETUP.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/SECURITY.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/AUTHENTICATION.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/CLIENT_QUICKSTART.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/Makefile +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/README.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/api-reference.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/architecture.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/client-guide.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/conf.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/configuration.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/deployment.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/development.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/index.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/installation.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/quickstart.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/requirements.txt +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/storage.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/docs/troubleshooting.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppclient.conf.example +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppgui-electron/.gitignore +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppgui-electron/README.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppgui-electron/package-lock.json +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppgui-electron/package.json +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppgui-electron/src/main.ts +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppgui-electron/src/preload.ts +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppgui-electron/src/renderer/index.html +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppgui-electron/src/renderer/renderer.ts +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppgui-electron/src/renderer/styles.css +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppgui-electron/tsconfig.json +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/ppserver.toml.example +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/__init__.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/auth.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/config.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/database.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/models.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/ppclient.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/ppserver.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/scripts/__init__.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/scripts/create_api_key.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/storage.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/src/putplace/user_auth.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/test_aws_s3.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/test_aws_s3_README.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/README.md +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/__init__.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_admin_creation.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_auth.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_client.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_client_config.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_database.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_e2e.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_electron_gui.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_models.py +0 -0
- {putplace-0.5.1 → putplace-0.5.6}/tests/test_storage.py +0 -0
|
@@ -95,6 +95,40 @@ curl -X POST http://localhost:8000/api_keys \
|
|
|
95
95
|
-d '{"name": "my-key"}'
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
+
### Configuration Wizard
|
|
99
|
+
|
|
100
|
+
Use the configuration wizard to set up PutPlace after installation:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Interactive configuration
|
|
104
|
+
invoke configure
|
|
105
|
+
# Or: uv run python -m putplace.scripts.putplace_configure
|
|
106
|
+
|
|
107
|
+
# Non-interactive (for automation)
|
|
108
|
+
uv run python -m putplace.scripts.putplace_configure --non-interactive \
|
|
109
|
+
--admin-username admin \
|
|
110
|
+
--admin-email admin@example.com \
|
|
111
|
+
--storage-backend local
|
|
112
|
+
|
|
113
|
+
# Standalone AWS tests (v0.5.2+)
|
|
114
|
+
uv run python -m putplace.scripts.putplace_configure S3 # Test S3 access
|
|
115
|
+
uv run python -m putplace.scripts.putplace_configure SES # Test SES access
|
|
116
|
+
invoke configure --test-mode=S3 # Via invoke
|
|
117
|
+
invoke configure --test-mode=SES # Via invoke
|
|
118
|
+
|
|
119
|
+
# Test in specific region
|
|
120
|
+
uv run python -m putplace.scripts.putplace_configure S3 --aws-region us-west-2
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**What it does:**
|
|
124
|
+
- Creates admin user with secure password
|
|
125
|
+
- Tests MongoDB connection
|
|
126
|
+
- Checks AWS S3/SES access (optional)
|
|
127
|
+
- Configures storage backend (local or S3)
|
|
128
|
+
- Generates `ppserver.toml` configuration file
|
|
129
|
+
|
|
130
|
+
**Note:** The configure script uses `pty=True` in the invoke task to properly handle readline/terminal input for better backspace behavior.
|
|
131
|
+
|
|
98
132
|
## Common Commands
|
|
99
133
|
|
|
100
134
|
All development tasks are managed through `invoke` (see tasks.py):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: putplace
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.6
|
|
4
4
|
Summary: File and Metadata storage system
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -21,6 +21,7 @@ Classifier: Topic :: System :: Systems Administration
|
|
|
21
21
|
Requires-Python: >=3.10
|
|
22
22
|
Requires-Dist: argon2-cffi>=23.1.0
|
|
23
23
|
Requires-Dist: authlib>=1.3.0
|
|
24
|
+
Requires-Dist: certifi>=2023.0.0
|
|
24
25
|
Requires-Dist: configargparse>=1.7.0
|
|
25
26
|
Requires-Dist: fastapi>=0.110.0
|
|
26
27
|
Requires-Dist: google-auth>=2.27.0
|
|
@@ -115,7 +116,7 @@ invoke setup
|
|
|
115
116
|
# Configure the server (create admin user, check AWS, set storage backend)
|
|
116
117
|
source .venv/bin/activate
|
|
117
118
|
invoke configure
|
|
118
|
-
# Or directly:
|
|
119
|
+
# Or directly: putplace_configure
|
|
119
120
|
|
|
120
121
|
# Start MongoDB and server
|
|
121
122
|
invoke quickstart
|
|
@@ -129,16 +130,16 @@ PutPlace includes a configuration wizard to set up your server after installatio
|
|
|
129
130
|
|
|
130
131
|
```bash
|
|
131
132
|
# Interactive configuration (recommended for first-time setup)
|
|
132
|
-
|
|
133
|
+
putplace_configure
|
|
133
134
|
|
|
134
135
|
# Non-interactive configuration (for automation/CI/CD)
|
|
135
|
-
|
|
136
|
+
putplace_configure --non-interactive \
|
|
136
137
|
--admin-username admin \
|
|
137
138
|
--admin-email admin@example.com \
|
|
138
139
|
--storage-backend local
|
|
139
140
|
|
|
140
141
|
# With S3 storage
|
|
141
|
-
|
|
142
|
+
putplace_configure --non-interactive \
|
|
142
143
|
--admin-username admin \
|
|
143
144
|
--admin-email admin@example.com \
|
|
144
145
|
--storage-backend s3 \
|
|
@@ -146,13 +147,23 @@ putplace-configure --non-interactive \
|
|
|
146
147
|
--aws-region us-west-2
|
|
147
148
|
|
|
148
149
|
# Skip validation checks (useful for testing)
|
|
149
|
-
|
|
150
|
+
putplace_configure --skip-checks
|
|
151
|
+
|
|
152
|
+
# Standalone AWS tests (new in v0.5.2)
|
|
153
|
+
putplace_configure S3 # Test S3 access
|
|
154
|
+
putplace_configure SES # Test SES access
|
|
155
|
+
putplace_configure S3 --aws-region us-west-2 # Test in specific region
|
|
156
|
+
|
|
157
|
+
# Via invoke task
|
|
158
|
+
invoke configure --test-mode=S3
|
|
159
|
+
invoke configure --test-mode=SES
|
|
150
160
|
```
|
|
151
161
|
|
|
152
162
|
**Features:**
|
|
153
163
|
- ✅ **Creates admin user** with secure password generation
|
|
154
164
|
- ✅ **Tests MongoDB connection** before configuration
|
|
155
165
|
- ✅ **Checks AWS S3 and SES access** (optional)
|
|
166
|
+
- ✅ **Standalone S3/SES tests** - Test AWS credentials independently
|
|
156
167
|
- ✅ **Configures storage backend** (local or S3)
|
|
157
168
|
- ✅ **Generates `ppserver.toml`** configuration file
|
|
158
169
|
- ✅ **Non-interactive mode** for automation
|
|
@@ -361,7 +372,7 @@ The server looks for `ppserver.toml` in:
|
|
|
361
372
|
2. `~/.config/putplace/ppserver.toml` (user config)
|
|
362
373
|
3. `/etc/putplace/ppserver.toml` (system config)
|
|
363
374
|
|
|
364
|
-
You can also use `invoke configure` or `
|
|
375
|
+
You can also use `invoke configure` or `putplace_configure` for guided setup. Environment variables can override TOML settings if needed. See [Configuration Guide](https://putplace.readthedocs.io/en/latest/configuration.html) for details.
|
|
365
376
|
|
|
366
377
|
## API Endpoints
|
|
367
378
|
|
|
@@ -384,9 +395,21 @@ Once the server is running:
|
|
|
384
395
|
**Authentication:**
|
|
385
396
|
- `POST /api/register` - Register new user
|
|
386
397
|
- `POST /api/login` - Login and get JWT token
|
|
398
|
+
- `POST /api/auth/google` - Google Sign-In authentication
|
|
399
|
+
- `GET /api/oauth/config` - Get OAuth configuration
|
|
387
400
|
- `POST /api_keys` - Create API key (requires JWT)
|
|
388
401
|
- `GET /api_keys` - List API keys (requires JWT)
|
|
389
402
|
|
|
403
|
+
**Google Sign-In Setup:**
|
|
404
|
+
|
|
405
|
+
To enable Google Sign-In in the Electron client and web interface, see [GOOGLE_OAUTH_SETUP.md](GOOGLE_OAUTH_SETUP.md) for detailed configuration instructions.
|
|
406
|
+
|
|
407
|
+
Quick summary:
|
|
408
|
+
1. Create OAuth credentials in [Google Cloud Console](https://console.cloud.google.com/)
|
|
409
|
+
2. Add Client ID to `ppserver.toml` or set `GOOGLE_CLIENT_ID` environment variable
|
|
410
|
+
3. Restart the server
|
|
411
|
+
4. Google Sign-In button will appear automatically in the Electron client
|
|
412
|
+
|
|
390
413
|
See [API Reference](https://putplace.readthedocs.io/en/latest/api-reference.html) for complete endpoint documentation.
|
|
391
414
|
|
|
392
415
|
## Architecture
|
|
@@ -65,7 +65,7 @@ invoke setup
|
|
|
65
65
|
# Configure the server (create admin user, check AWS, set storage backend)
|
|
66
66
|
source .venv/bin/activate
|
|
67
67
|
invoke configure
|
|
68
|
-
# Or directly:
|
|
68
|
+
# Or directly: putplace_configure
|
|
69
69
|
|
|
70
70
|
# Start MongoDB and server
|
|
71
71
|
invoke quickstart
|
|
@@ -79,16 +79,16 @@ PutPlace includes a configuration wizard to set up your server after installatio
|
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
81
|
# Interactive configuration (recommended for first-time setup)
|
|
82
|
-
|
|
82
|
+
putplace_configure
|
|
83
83
|
|
|
84
84
|
# Non-interactive configuration (for automation/CI/CD)
|
|
85
|
-
|
|
85
|
+
putplace_configure --non-interactive \
|
|
86
86
|
--admin-username admin \
|
|
87
87
|
--admin-email admin@example.com \
|
|
88
88
|
--storage-backend local
|
|
89
89
|
|
|
90
90
|
# With S3 storage
|
|
91
|
-
|
|
91
|
+
putplace_configure --non-interactive \
|
|
92
92
|
--admin-username admin \
|
|
93
93
|
--admin-email admin@example.com \
|
|
94
94
|
--storage-backend s3 \
|
|
@@ -96,13 +96,23 @@ putplace-configure --non-interactive \
|
|
|
96
96
|
--aws-region us-west-2
|
|
97
97
|
|
|
98
98
|
# Skip validation checks (useful for testing)
|
|
99
|
-
|
|
99
|
+
putplace_configure --skip-checks
|
|
100
|
+
|
|
101
|
+
# Standalone AWS tests (new in v0.5.2)
|
|
102
|
+
putplace_configure S3 # Test S3 access
|
|
103
|
+
putplace_configure SES # Test SES access
|
|
104
|
+
putplace_configure S3 --aws-region us-west-2 # Test in specific region
|
|
105
|
+
|
|
106
|
+
# Via invoke task
|
|
107
|
+
invoke configure --test-mode=S3
|
|
108
|
+
invoke configure --test-mode=SES
|
|
100
109
|
```
|
|
101
110
|
|
|
102
111
|
**Features:**
|
|
103
112
|
- ✅ **Creates admin user** with secure password generation
|
|
104
113
|
- ✅ **Tests MongoDB connection** before configuration
|
|
105
114
|
- ✅ **Checks AWS S3 and SES access** (optional)
|
|
115
|
+
- ✅ **Standalone S3/SES tests** - Test AWS credentials independently
|
|
106
116
|
- ✅ **Configures storage backend** (local or S3)
|
|
107
117
|
- ✅ **Generates `ppserver.toml`** configuration file
|
|
108
118
|
- ✅ **Non-interactive mode** for automation
|
|
@@ -311,7 +321,7 @@ The server looks for `ppserver.toml` in:
|
|
|
311
321
|
2. `~/.config/putplace/ppserver.toml` (user config)
|
|
312
322
|
3. `/etc/putplace/ppserver.toml` (system config)
|
|
313
323
|
|
|
314
|
-
You can also use `invoke configure` or `
|
|
324
|
+
You can also use `invoke configure` or `putplace_configure` for guided setup. Environment variables can override TOML settings if needed. See [Configuration Guide](https://putplace.readthedocs.io/en/latest/configuration.html) for details.
|
|
315
325
|
|
|
316
326
|
## API Endpoints
|
|
317
327
|
|
|
@@ -334,9 +344,21 @@ Once the server is running:
|
|
|
334
344
|
**Authentication:**
|
|
335
345
|
- `POST /api/register` - Register new user
|
|
336
346
|
- `POST /api/login` - Login and get JWT token
|
|
347
|
+
- `POST /api/auth/google` - Google Sign-In authentication
|
|
348
|
+
- `GET /api/oauth/config` - Get OAuth configuration
|
|
337
349
|
- `POST /api_keys` - Create API key (requires JWT)
|
|
338
350
|
- `GET /api_keys` - List API keys (requires JWT)
|
|
339
351
|
|
|
352
|
+
**Google Sign-In Setup:**
|
|
353
|
+
|
|
354
|
+
To enable Google Sign-In in the Electron client and web interface, see [GOOGLE_OAUTH_SETUP.md](GOOGLE_OAUTH_SETUP.md) for detailed configuration instructions.
|
|
355
|
+
|
|
356
|
+
Quick summary:
|
|
357
|
+
1. Create OAuth credentials in [Google Cloud Console](https://console.cloud.google.com/)
|
|
358
|
+
2. Add Client ID to `ppserver.toml` or set `GOOGLE_CLIENT_ID` environment variable
|
|
359
|
+
3. Restart the server
|
|
360
|
+
4. Google Sign-In button will appear automatically in the Electron client
|
|
361
|
+
|
|
340
362
|
See [API Reference](https://putplace.readthedocs.io/en/latest/api-reference.html) for complete endpoint documentation.
|
|
341
363
|
|
|
342
364
|
## Architecture
|