Giter Site home page Giter Site logo

pg-database-utils's People

Contributors

dharvey-consbio avatar nikmolnar avatar

Watchers

 avatar  avatar  avatar  avatar

pg-database-utils's Issues

Support connection options

It would be helpful to support connection options so that SSL connections could be made.

Here's an example of using connect_args in SQLAlchemy:

db = create_engine('postgresql+pg8000://user:pass@hostname/dbname', connect_args={'sslmode':'require'})

On the Django side, these should come from the [OPTION](https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-OPTIONS) param in the DATABASE settings. For example:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': "db_name",
        'USER': "db_username",
        'PASSWORD': "db_password",
        'HOST': "db_host",
        'OPTIONS': {'sslmode': 'require'},
    },
}

`get_engine` fails when using GeoDjango database engine

In order to use spatially-enabled Django models, the Django DATABASE settings must use django.contrib.gis.db.backends.postgis as the engine. However, pg-database-utils then requests a postgis dialect from SQLAlchemy, which fails with:

sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgis

Since this library is specific to postgresql databases, is it even necessary to get the engine/dialect from settings? Couldn't 'postgres` be hard-coded?

Add support for SQLAlchemy 1.4

The most recent version of SQLAlchemy is 1.4.32. This library excludes 1.4 with it's dependency spec: sqlalchemy = "1.3.*". I'm not sure if there is code that would need to be changed to support 1.4, or if updating the dependency would be enough.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.