3

I want to create a Django project with DB PostgreSQL backend as much as possible platform-independent. I know that default Django Postgresql driver is platform-dependent psycopg. I saw this answer displaying DB-API compatibility. My questions to Django/pg8000 gurus are:

  1. How much crazy is my intention? Is it applicable/recommended to use platform-independent driver, or should I stuck to default psycopg driver? In java world using platform independent pure Java JDBC 4.0 drivers is common practice.
  2. Did anybody succeeded integrating pg8000 into Django project? If yes, are there some links to repository?
  3. Does pg8000 driver has some functional, architectural or other limitations which makes impossible to use it with Django?
Community
  • 1
  • 1
lospejos
  • 1,976
  • 3
  • 19
  • 35
  • since 2016, did you answer any of those questions already? mind sharing them or related findings here? – ppython Aug 30 '17 at 15:15

1 Answers1

0

I know pg8000 well, but Django not so well. Pg8000 should provide all the functionality you need to implement a Django back-end. The trade-off for being pure-Python is that pg8000 is significantly slower than Psycopg2.

Tony Locke
  • 454
  • 3
  • 9
  • To complement, here's a [github issue also suggesting the creation of a pg8000 django backend](https://github.com/mfenniak/pg8000/issues/102) – ppython Aug 30 '17 at 15:18