aidesk
A simple web service with file operations, authentication and instance management.
Features
- Web service based on Python's built-in
http.server - User authentication (login/logout)
- API endpoint to generate files from text content
- API endpoint to upload files
- Instance registration and management
- CLI to start the service with custom host and port
- Web interface for API documentation and instance management
Installation
pip install aidesk
Usage
Start the web service:
Default host (localhost) and port (8000)
aidesk
Custom host and port
aidesk --host 0.0.0.0 --port 8080
Debug mode
aidesk --debug
Once the service is running, you can access the API documentation at http://localhost:8000
Default credentials:
- Username: admin
- Password: admin
API
Authentication
POST /api/login
Parameters:
username: Your usernamepassword: Your password
Example:
curl -X POST http://localhost:8000/api/login
-d "username=admin&password=admin"
POST /api/logout
Example:
curl -X POST http://localhost:8000/api/logout
-b "session_id=your_session_id"
File Operations
POST /api/generate-file (Requires authentication)
Parameters:
filename: Name of the file to generatecontent: Multi-line text content for the file
Example:
curl -X POST http://localhost:8000/api/generate-file
-b "session_id=your_session_id"
-d "filename=example.txt&content=First line%0ASecond line%0AThird line"
POST /api/upload-file (Requires authentication)
Parameters:
- File data as multipart/form-data
Example:
curl -X POST http://localhost:8000/api/upload-file
-b "session_id=your_session_id"
-F "file=@localfile.txt"
Instance Management
POST /api/instances/register (No authentication required)
Registers another aidesk instance with this server.
Parameters:
hostname: Instance hostnameip: Instance IP addressport: Instance port numberstart_time: Instance start time (ISO format)
Example:
curl -X POST http://localhost:8000/api/instances/register
-d "hostname=worker1&ip=192.168.1.100&port=8001&start_time=$(date -Iseconds)"
POST /api/instances/ping (No authentication required)
Updates instance status (heartbeat).
Parameters:
instance_id: ID of the instance (format: ip:port)
Example:
curl -X POST http://localhost:8000/api/instances/ping
-d "instance_id=192.168.1.100:8001"
GET /api/instances (Requires authentication)
Gets all registered instances.
Example:
curl -X GET http://localhost:8000/api/instances
-b "session_id=your_session_id"
DELETE /api/instances/{instance_id} (Requires authentication)
Removes a registered instance.
Example:
curl -X DELETE http://localhost:8000/api/instances/192.168.1.100:8001
-b "session_id=your_session_id"
Web Interface
- Home/API Documentation: http://localhost:8000
- Login: http://localhost:8000/login
- Instance Management: http://localhost:8000/manage-instances
License
MIT
Metadata
Release files for aidesk 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aidesk-0.3.0.tar.gz | 24.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aidesk-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.2 kB
Release files / aidesk-0.3.0.tar.gz
| Download URL | aidesk-0.3.0.tar.gz |
|---|---|
| Size | 24.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7863e11d970f3f16040375682bd2e266a93d809f56e13f8b4623a3c6d253a408
|
|
BLAKE2b-256 checksum How to use checksums |
55eee1503d9493621514cc99814771a04d391365d736f85a5b376a79921cf931
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.13
|
Release files / aidesk-0.3.0-py3-none-any.whl
| Download URL | aidesk-0.3.0-py3-none-any.whl |
|---|---|
| Size | 27.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
098f2e1064deed158385c2a5f0d51d234d206712c8ea7cbbd7f33312f7b532b7
|
|
BLAKE2b-256 checksum How to use checksums |
79d308617af33823e175bda1ffab46536bd413c5506a29f64ad7476621f389b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.13
|
Security for aidesk 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.