Skip to content

jagritiS/crud_postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

  1. Enter PostgreSQL credentials

  2. Choose whether to use an existing database or create a new one

  3. Enter table name

  4. Define table columns

  5. Use the menu to:

    • Insert data
    • Read data
    • Update records
    • Delete records
  6. 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.


About

PSQL CRUD tool

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages