Skip to main content

A readonly database backend for Django and PostgreSQL. It does this by setting the connection to “readonly”.

Usage

To configure a read-only database connection, add an entry to your DATABASES setting that uses django_postgres_readonly as the engine:

DATABASES = {
    'default': {
        'NAME': 'my_django_db',
        'ENGINE': 'django.db.backends.postgresql',
        'USER': 'my_db_user',
        'PASSWORD': 'my_password'
    },
    'readonly': {
        'NAME': 'my_django_db',
        'ENGINE': 'django_postgres_readonly',
        'USER': 'my_db_user',
        'PASSWORD': 'my_password'
    }
}

Caveats

This backend is not meant to provide security against willful bad actors. Its main reason of existence is to protect you against your own mistakes.

If you need secure way for read-only connections, you should probably look into creating a separate user and grant it SELECT rights only.

Metadata

Release files for django-postgres-readonly 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-postgres-readonly 1.0.0
File Size Uploaded Provenance Actions
django-postgres-readonly-1.0.0.tar.gz 2.8 kB Without provenance Details for django-postgres-readonly-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-postgres-readonly 1.0.0
File Interpreter ABI Platform Actions
django_postgres_readonly-1.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for django_postgres_readonly-1.0.0-py2.py3-none-any.whl

Total release size: 6.6 kB

Release files / django-postgres-readonly-1.0.0.tar.gz

Download URL django-postgres-readonly-1.0.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
198eef0319f72225c23786203c4520a3a249bb4d83bd9066b2ac1c550073433c
BLAKE2b-256 checksum
How to use checksums
53bed210ccece0088aec806d209afa80249cce953b007909421091a30fdf8cdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_postgres_readonly-1.0.0-py2.py3-none-any.whl

Download URL django_postgres_readonly-1.0.0-py2.py3-none-any.whl
Size 3.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
114e158ca38a157b7453d614aa9a9fd82646f0b5a91bbe0a496c4b3a1a852dfc
BLAKE2b-256 checksum
How to use checksums
a5fa99acbc56aae92cf9d1b48da42a6685178c4b90a62cdcf5e677728f8255de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-postgres-readonly 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page