Skip to content

aditya-since-2002/Connecting-postgre-using-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Connecting postgre using python

N|Solid

  • Hey there
  • ✨let's begin✨

Setting up virtual enviroment using cmd

If you don't have pip installed follow below step

sudo apt-get install python-pip

Installing Virtual Env

pip install virtualenv

Check your Installation

virtualenv --version

Create the virtual env

virtualenv virtualenv_name

To activate the enviroment

Go to the file using CMD and in the scripts type activate

To deactivate the enviroment

Write deactivate in the running virtual enviroment

What is Virtual Enviroment?

To read more about virtual enviroment read here

What is postgresql?

To read documentation about postgresql read here

What is python?

To read documentation about python read here

What is pycopy2?

To read documentation about pscopy2 read here

Connection between python and postgresql

psycopg2.connect(dbname="postgres",user="postgres",password="####",host="localhost",port="5433")

dbname is the name of the databasefile user is the name that user has registred for the username in postgres password is the key that the user used while registering on postgres host is the place where the data is going to be stored port is a virtual point where network connections start and end.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages