Interactive PostgreSQL CRUD CLI tool
Project description
PostgreSQL CRUD CLI Tool
An interactive command-line tool to perform CRUD operations on PostgreSQL databases and generate Python CRUD scripts automatically.
Why Use This Tool
This tool is useful for developers who want to avoid writing repetitive CRUD operations and manually setting up PostgreSQL in their Python projects.
With this tool:
- The required PostgreSQL library is handled automatically
- A database can be created or selected
- A connection is established
- Tables are created dynamically
- A Python file is generated with basic CRUD operations
This helps developers save time and focus on application logic instead of setup and boilerplate code.
Features
-
Connect to PostgreSQL using username and password
-
Create a new database or use an existing one
-
Create tables dynamically
-
Perform CRUD operations:
- Insert
- Read
- Update
- Delete
-
Generate reusable Python CRUD code for your tables
-
Simple and beginner-friendly command-line interface
GitHub Repository
https://github.com/jagritiS/crud_postgres
Installation
Install from PyPI:
pip install psql-crud-tool
Usage
Run the CLI tool:
psqlcrud
Example Workflow
-
Enter PostgreSQL credentials
-
Choose whether to use an existing database or create a new one
-
Enter table name
-
Define table columns
-
Use the menu to:
- Insert data
- Read data
- Update records
- Delete records
-
Generate a reusable CRUD Python file
Generated File
The tool generates a file named:
crud_generated.py
This file includes basic functions for:
- Insert
- Read
- Update
- Delete
Disclaimer
This tool is intended for learning and development purposes. Avoid using raw input directly in production environments due to SQL injection risks.
Author
Jagriti Srivastava
License
MIT License
Contributing
Contributions are welcome. Feel free to fork the repository and submit pull requests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file psql_crud_tool-0.1.0.tar.gz.
File metadata
- Download URL: psql_crud_tool-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e44216283876bb7fd74992ee6cf8eca1235fadff0bcf2a6449e5c000d1392373
|
|
| MD5 |
29cb6990d410b5ab5a9f6aefd603d1aa
|
|
| BLAKE2b-256 |
bcf6e45b5ce9340a2966314cd5719c12c549644ded25e397142783a7a15a6560
|
File details
Details for the file psql_crud_tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: psql_crud_tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8351c13477cc4309bb6ebf73c0991ae6feecc98d3198cef33874da2810c4c8c1
|
|
| MD5 |
6f1d080912d45167f1508fadce550db9
|
|
| BLAKE2b-256 |
978b6f3dbdea6b378108a73b1bc354b1d2716ae614a3830416cec7f83e776e3b
|