postgresql-api

API for postgresql


Keywords
database, oop, postgresql, easy
License
MIT
Install
pip install postgresql-api==2.0.2.dev1

Documentation

PostgreSQL API Downloads PyPi version License: MIT

Installation

Install from PyPi

pip install postgresql-api

Install from GitHub

git clone https://github.com/AlexDev-py/postgresql_api.git

Create table classes

from postgresql_api.Table import Table

class MyTable(Table):
    my_first_field: str
    my_second_field: int

Using

Initiate the database:

from my_tables import MyTable 
my_table = MyTable(db_host="URL to db")

Create tables:

my_table.create_table()

Inserting data:

my_table.insert(
    my_first_field='first',
    my_second_field='second',
)

Getting data:

data = my_table.filter()

Sorting data:

data = my_table.filter(my_field='value')

More information in the example folder

VK: AlexDev