{"id":13448786,"url":"https://github.com/kennethreitz/django-postgrespool","last_synced_at":"2025-03-22T18:31:59.939Z","repository":{"id":57421348,"uuid":"326021340","full_name":"kennethreitz/django-postgrespool","owner":"kennethreitz","description":"Postgres Connection Pooling for Django, powered by SQLAlchemy.","archived":false,"fork":true,"pushed_at":"2022-08-06T03:10:34.000Z","size":30,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T07:03:51.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/django-postgrespool","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"heroku-python/django-postgrespool","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kennethreitz.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-01T17:09:18.000Z","updated_at":"2024-11-01T09:17:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kennethreitz/django-postgrespool","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz%2Fdjango-postgrespool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz%2Fdjango-postgrespool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz%2Fdjango-postgrespool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz%2Fdjango-postgrespool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kennethreitz","download_url":"https://codeload.github.com/kennethreitz/django-postgrespool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245002793,"owners_count":20545498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T06:00:21.076Z","updated_at":"2025-03-22T18:31:54.910Z","avatar_url":"https://github.com/kennethreitz.png","language":null,"funding_links":[],"categories":["Database"],"sub_categories":[],"readme":"Django-PostgresPool\n===================\n\nThis is a simple Postgres Connection Pooling backend for Django 1.4+, powered by the lovely and beautiful SQLAlchemy.\n\n\nUsage\n-----\n\nUsing Django-PostgresPool is simple, just set ``django_postgrespool`` as your connection engine:\n\n::\n\n    DATABASES = {\n        'default': {\n            'ENGINE': 'django_postgrespool'\n\n\nIf you're using the `dj-database-url \u003chttps://crate.io/packages/dj-database-url/\u003e`_ module:\n\n::\n\n    import dj_database_url\n\n    DATABASES = {'default': dj_database_url.config(engine='django_postgrespool')}\n\nIf you're using `south \u003chttp://south.aeracode.org\u003e`_:\n\n::\n\n    SOUTH_DATABASE_ADAPTERS = {\n        'default': 'south.db.postgresql_psycopg2'\n    }\n\n\nEverything should work as expected.\n\n\nInstallation\n------------\n\nInstalling Django-PostgresPool is simple, with pip::\n\n    $ pip install django-postgrespool\n\nConfiguration\n-------------\n\nOptionally, you can provide additional options to pass to SQLAlchemy's pool creation::\n\n    DATABASE_POOL_ARGS = {\n        'max_overflow': 10,\n        'pool_size': 5,\n        'recycle': 300\n    }\n\nHere's a basic explanation of two of these options:\n\n* **pool_size** – The *minimum* number of connections to maintain in the pool.\n* **max_overflow** – The maximum *overflow* size of the pool. This is not the maximum size of the pool.\n\nThe total number of \"sleeping\" connections the pool will allow is ``pool_size``.\nThe total simultaneous connections the pool will allow is ``pool_size + max_overflow``.\n\nAs an example, databases in the `Heroku Postgres \u003chttps://postgres.heroku.com\u003e`_ starter tier have a maximum connection limit of 20. In that case your ``pool_size`` and ``max_overflow``, when combined, should not exceed 20.\n\nCheck out the official `SQLAlchemy Connection Pooling \u003chttp://docs.sqlalchemy.org/en/latest/core/pooling.html#sqlalchemy.pool.QueuePool.__init__\u003e`_ docs to learn more about the optoins that can be defined in ``DATABASE_POOL_ARGS``.\n\nDjango 1.3 Support\n------------------\n\ndjango-postgrespool currently supports Django 1.4 and greater. See `this ticket \u003chttps://github.com/kennethreitz/django-postgrespool/pull/9\u003e`_ for 1.3 support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennethreitz%2Fdjango-postgrespool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkennethreitz%2Fdjango-postgrespool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennethreitz%2Fdjango-postgrespool/lists"}