0

I am trying to create a postgresql database named my_database which will have table_yesterday, table_today, and table_tomorrow. I have never created a database before because I have only worked with .csv files.

The goal is to write a program that updates a few database tables that will be used by other programs, and if that database doesn't exist then create it and then download a ton of data into it.

How would I create a database with the username and password in my config.py file using python?

All the code I can find gives examples in sqlite.

user1367204
  • 4,549
  • 10
  • 49
  • 78
  • do you have a psql server? sqlite is a file-based db thats easy to create on the fly, for psql or sqlserver you need a db server. – Patrick Artner Mar 15 '18 at 20:25
  • 1
    Possible duplicate of [Create a Postgres database using python](https://stackoverflow.com/questions/34484066/create-a-postgres-database-using-python) – Patrick Artner Mar 15 '18 at 20:26

0 Answers0