DBGear Editor
FastHTML-based web interface for viewing and managing DBGear projects with dynamic project switching capabilities.
🚀 Features
- Web-based Interface: Modern FastHTML-powered web UI
- Dynamic Project Switching: Switch between multiple DBGear projects without restart
- Schema Visualization: View tables, views, procedures, and triggers
- Dependencies Mapping: Visualize relationships between database objects
- Project Management: Add, switch, and manage multiple projects
- Persistent Configuration: Settings saved to
~/.dbgear/editor_config.json
📦 Installation
From PyPI (when available)
pip install dbgear-editor
From Source
git clone <repository>
cd dbgear.feature-editor/packages/dbgear-editor
pip install -e .
🏃 Usage
Command Line
# Start with default project
dbgear-editor
# Specify project directory
dbgear-editor --project /path/to/project
# Custom host and port
dbgear-editor --host 0.0.0.0 --port 8080
# Enable auto-reload for development
dbgear-editor --reload
Web Interface
- Open
http://localhost:8000in your browser - Use the project dropdown in the header to switch between projects
- Click the
+button or navigate to/projects/addto add new projects - Navigate using the sidebar to explore schemas and database objects
🐳 Docker Usage
Build and Run
# Build the image
cd packages/dbgear-editor
docker build -t dbgear-editor .
# Run with project directory mounted
docker run -p 8000:8000 \
-v /path/to/your/projects:/app/data/projects:ro \
dbgear-editor
With Specific Project
# Start with a specific project
docker run -p 8000:8000 \
-v /path/to/project:/app/data/my-project:ro \
-e PROJECT_PATH=/app/data/my-project \
dbgear-editor
Persistent Configuration
# Persist settings across container restarts
docker run -p 8000:8000 \
-v dbgear-config:/home/dbgear/.dbgear \
-v /path/to/projects:/app/data/projects:ro \
dbgear-editor
Environment Variables
| Variable | Description | Default |
|---|---|---|
PROJECT_PATH |
Auto-load project path on startup | None |
PYTHONPATH |
Python module search path | /app |
🗂️ Project Structure
DBGear Editor expects projects to have the following structure:
project-directory/
├── project.yaml # DBGear project configuration
├── schema.yaml # Schema definitions
└── data/ # Optional data files
├── schema_name/
│ └── table_name.dat
└── ...
⚙️ Configuration
Settings are automatically saved to ~/.dbgear/editor_config.json:
{
"version": "1.0",
"current_project": "/path/to/current/project",
"recent_projects": [
{
"name": "Project Name",
"path": "/path/to/project",
"last_accessed": "2025-01-09T10:30:00Z"
}
]
}
🔧 Development
Prerequisites
- Python 3.12+
- Poetry (optional, for dependency management)
Setup
# Clone repository
git clone <repository>
cd dbgear.feature-editor
# Install in development mode
cd packages/dbgear-editor
pip install -e .
# Or with poetry
poetry install
Running in Development Mode
# With auto-reload
dbgear-editor --reload --project /path/to/test/project
# Docker development
docker run -p 8000:8000 \
-v $(pwd):/app \
-v /path/to/projects:/app/data/projects:ro \
dbgear-editor --reload
🛠️ Troubleshooting
Common Issues
-
Project not loading
- Ensure
project.yamlexists in the project directory - Check file permissions
- Verify the project path is correct
- Ensure
-
Docker permission issues
# Run with specific user docker run --user $(id -u):$(id -g) -p 8000:8000 dbgear-editor
-
Port already in use
# Use different port dbgear-editor --port 8080
Logs and Debugging
# Check container logs
docker logs <container_id>
# Access container shell
docker exec -it <container_id> bash
# Verbose startup
docker run -p 8000:8000 -e PYTHONUNBUFFERED=1 dbgear-editor
📝 Version History
v0.7.0
- ✅ Dynamic Project Switching: Switch between projects without restart
- ✅ Settings Persistence: Configuration saved automatically to
~/.dbgear/editor_config.json - ✅ Enhanced UI: MonsterUI Select dropdown with project path display
- ✅ Project Management: Dedicated management page at
/projects/add - ✅ Dynamic Page Titles: Format
schema@table (project_path)for better tab identification - ✅ Clean Architecture: Removed JavaScript dependencies and Label components
- ✅ Docker Support: Single-stage build for development efficiency
v0.6.0
- FastHTML-based web interface
- Schema visualization
- Dependencies mapping
- 3-pane layout system
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
📄 License
This project is licensed under the MIT License.
Copyright (c) 2022 tamuto
See the LICENSE file for details.
🔗 Links
Metadata
Release files for dbgear-editor 0.8.2
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 | Actions |
|---|---|---|---|---|
| dbgear_editor-0.8.2.tar.gz | 28.4 kB | Without provenance | Details for dbgear_editor-0.8.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbgear_editor-0.8.2-py3-none-any.whl | Python 3 | none | any | Details for dbgear_editor-0.8.2-py3-none-any.whl |
Total release size: 67.6 kB
Release files / dbgear_editor-0.8.2.tar.gz
| Download URL | dbgear_editor-0.8.2.tar.gz |
|---|---|
| Size | 28.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
773bf6d856073416ca159ab1737bc9eb3358254b56b6c7ff86b6dfcb186957d7
|
|
BLAKE2b-256 checksum How to use checksums |
eae0b4eceaa028e00aea209f702812be63dce13cb9219ad49e11f83883a59708
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.3 Linux/5.15.136-tegra
|
Release files / dbgear_editor-0.8.2-py3-none-any.whl
| Download URL | dbgear_editor-0.8.2-py3-none-any.whl |
|---|---|
| Size | 39.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f02bd89615b59b7438b678494acc5f433ec283bfc571bf41b2a1d527accc2578
|
|
BLAKE2b-256 checksum How to use checksums |
cc09d559213d0b75e4a0aac3b604714c1c0609db7333d6735436fe093d3bc8b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.3 Linux/5.15.136-tegra
|
Security for dbgear-editor 0.8.2
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.