Postgresql
Python define a new PostgreSQL connection
Define new PostgreSQL database connection and store credentials in .env file. Provide in this recipe: database name, username, password, host address and port.
pythonpostgresqlsqlpsycopg.env
Interactive recipe
You can use below interactive recipe to generate code. This recipe is available in MLJAR Studio.
Python code
# Python code will be here
Code explanation
- Save provided values in .env file as POSTGRESQL credentails.
- Notify the user when operation gets completed.
Example Python notebooks
Please find inspiration in example notebooks
Postgresql cookbook
Code recipes from Postgresql cookbook.
- « Previous
- Postgresql
- Next »
- Connect to database