Skip to main content

django-cartodb-sync

A Django app that helps keep CartoDB tables synchronized with Django models.

Requirements

Django >= 1.8, cartodb-python, a CartoDB account.

Installation

Use pip.

Add to INSTALLED_APPS:

INSTALLED_APPS += (
    'cartodbsync',
)

Then add the appropriate configuration details to your settings.

You will need some way of letting django-cartodb-sync about instances that need to be inserted, updated, or deleted. The simplest way is to use signals and the SyncEntry methods mark_as_pending_delete, mark_as_pending_insert, and mark_as_pending_update.

Finally, configure a cron job to run the cartodbsync management command. If you have existing model instances, mark all for insertion by running:

django-admin.py cartodbsync --markinsert

Configuration

Add the following to your settings:

CARTODB_SYNC = {
    'API_KEY': '<your api key>',
    'DOMAIN': '<your CartoDB domain>',
    'MODELS': [
        {
            'CARTODB_TABLE': '<model CartoDB table>',
            'MODEL_CLASS': '<example.Model>',
            'SYNCHRONIZER_CLASS': '<example.Synchronizer>',
        }
    ]
}

Everything between < and > should be replaced with appropriate details. You can list as many models as you like within the MODELS entry.

Metadata

Release files for django-cartodb-sync 0.3.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-cartodb-sync 0.3.0
File Size Uploaded Provenance Actions
django-cartodb-sync-0.3.0.tar.gz 11.7 kB Without provenance Details for django-cartodb-sync-0.3.0.tar.gz

Release files / django-cartodb-sync-0.3.0.tar.gz

Download URL django-cartodb-sync-0.3.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3e232efafeba3e7d57e00bfa3aae27bd7543ce97de1fdf84374b0b81d5c20560
BLAKE2b-256 checksum
How to use checksums
8eaa71d8a9d6f35dd0a937ed47b0081627851fca614533e186be3c4d7aa1316c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-cartodb-sync 0.3.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.

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