Skip to main content


Showing posts from March, 2021

Firebase Realtime Database / Cloud Firestore Connection Python Django

It is always interesting to combine firebase with another server such as elasticsearch or crawler or mailing server on a separate server. Then of course a connection is needed, we use python in this example. sudo pip install firebase-admin import firebase_admin from firebase_admin import credentials cred = credentials . Certificate ( "path/to/serviceAccountKey.json" ) firebase_admin . initialize_app ( cred )   Init and Retrieve Data from def handle(self, *args, **options):          cred = credentials.Certificate("/")          firebase_admin.initialize_app(cred, {                  'databaseURL': ''          })          jobs = Job.objects.all()[:3]          ref = db.reference("/jobs")          import pdb;pdb.set_trace()          for job in

Postgres into a distributed database Citus Django Ubuntu

Citus is an open source extension of Postgres that can distribute data and queries among multiple nodes in a cluster. Because Citus is an extension (not a branch) of Postgres, when you use Citus, you are also using Postgres. You can take advantage of the latest Postgres features, tools, and ecosystem. In apt-get I could not add repositories because it is configured by default only have support for only LTS versions of operating systems. I will try manually downloading and installing the package.    This repository is all moved…  I found packages on this repository.   wget --content-disposition   sudo dpkg -i postgresql-12-citus-10.0_10.0.2.citus-1_amd64.deb Package libpq5 is not installed. postgresql-12-citus-10.0 depends on postgresql-12; however Package postgresql-12 is not