1- Installing Python from Python.org Go on Python.org at the section where you can download the windows executables: https://www.python.org/downloads/windows/ Go down in the page and download the following executable (if your computer is 64 bits): Windows x86-64 executable installer Double click on the executable and install it 2- Add Python 3 to the windows 10 environment variable path I will suppose that you didn’t check the “add python to the path” checkbox when you installed it. Let’s see now how to add this new python 3 version to the path By default, it installs in the path: C:\Users\cypri\AppData\Local\Programs\Python ( cypri will be replaced by your windows user name of course…) This is not convenient, because AppData is a hidden folder and it may cause problems with some python modules such as jupyter if you leave it here The move is to C:/ Change the name of the executable to python3.exe for convenience Let’s now edit the environment variables to add this new pyth...
How to Connect Django With PostgreSql Database: Before need to Download: PostgreSql ( download ) and PG Admin- Download ( To view Data We use This Software) Install psycopg2 Package in your virtual environment or Command Prompt ( Using pip install django psycopg2) Goto your settings.py in your django project and add DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'postgres', 'USER': 'postgres', 'PASSWORD': 'password, 'HOST': 'localhost', 'PORT': '5432', } } cd ~/myproject python manage.py makemigrations python manage.py migrate After creating the database structure, we can ...
pyrebase python documentation or how to Connect Firebase For Authenticate and Database Usage If you do not Install then install using "pip install Pyrebase" Add Pyrebase to your application For use with only user based authentication we can create the following configuration : import pyrebase config = { "apiKey" : "apiKey" , "authDomain" : "projectId.firebaseapp.com" , "databaseURL" : "https://databaseName.firebaseio.com" , "storageBucket" : "projectId.appspot.com" } firebase = pyrebase.initialize_app(config) We can optionally add a service account credential to our configuration that will allow our server to authenticate with Firebase as an admin and disregard any security rules. create project using Firebase -- https://console.firebase.google.com/ import pyrebase config = { "apiKey" : "apiKey" , "authDomain" : "projectId.firebaseapp.com" , ...
Comments
Post a Comment