Skip to content

paulmeller/streamlit-db-admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StreamlitDBAdmin

StreamlitDBAdmin provides an interactive and user-friendly interface to manage and interact with various databases. Easily view, edit, and manage your database schemas and tables right from the web interface.

Table of Contents

  1. Features
  2. Installation
  3. Usage
  4. Configuration
  5. Contributing
  6. License

Features

  • Database Connection: Connect to various database types with specified credentials.
  • Schema and Table Viewing: Retrieve and display a list of schemas and tables.
  • Table Data Viewing and Editing: View paginated table data and edit it directly within the interface.
  • Error Handling and Logging: Robust error handling and logging for troubleshooting.
  • Performance Optimization: Utilizes connection pooling for efficient database connections.

Installation

To install StreamlitDBAdmin, follow the steps below:

# Clone the repository
git clone https://github.com/your-username/streamlit-db-admin.git

# Navigate to the directory
cd streamlit-db-admin

# Install the required dependencies
pip install -r requirements.txt

# Run the Streamlit app
streamlit run main.py

Usage

Once the app is running, open your web browser and navigate to http://localhost:8501 to access the tool.

Configuration

You can configure the database connection by setting the following environment variables:

Variable Description Default
DB_TYPE The type of database postgresql
DB_DATABASE The name of the database (required)
DB_HOST The host of the database (required)
DB_PORT The port of the database (required)
DB_USER The username for the database connection postgres
DB_PASSWORD The password for the database connection (required)
EXCLUDED_TABLES Comma-separated list of tables to exclude from truncation user

Security

StreamlitDBAdmin includes the following security measures:

  • SQL Injection Protection: All table and schema names are validated and properly quoted before use in queries.
  • Credential Safety: Database passwords are URL-encoded and redacted from logs and error messages.
  • Destructive Operation Safeguards: Truncate and drop operations require typing "CONFIRM" to proceed.

Contributing

Contributions are welcome! Please read our Contributing Guide for more information on how to contribute.

License

StreamlitDBAdmin is licensed under the MIT License. See the LICENSE file for more details.

About

Streamlit Database Administration Tool provides an interactive and user-friendly interface to manage and interact with various databases. Easily view, edit, and manage your database schemas and tables right from the web interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages