Django Synctool
Synctool is a library for Django to make syncing querysets between databases easy. No more manually dumping or entering data. No more out-of-date fixtures. Just get the data you want, on demand.
Basic usage
Here’s an example for syncing the django.contrib.sites app.
1. Create an api view
# myapp.views
from synctools.routing import Route
route = Route()
@route.app("sites", "sites")
2. Add the urls to your project
# myproject.urls
from django.conf.urls import include, url
from myapp.views import route
urlpatterns += [
url("^sync/", include(route.urlpatterns)),
]
3. Sync data from the remote endpoint
# myclient.py
from synctools.client import Client
client = Client(
api_url="https://myserver.com/sync/",
api_token="<token>",
)
if __name__ == "__main__":
client.sync("sites")
The sites app can now be synced locally from a remote data source by calling:
python myclient.py
How it works
Under the hood Synctool uses the Django JSON serializer to pass data between servers. Synctool isn’t limited to syncing whole applications. It can also sync custom querysets and even download associated images.
Installation
Synctool can be installed from PyPI:
pip install django-synctool
Requirements
This library requires Django >= 1.7 and either Python 2.7 or Python >= 3.3.
Documentation
You can read the documentation here.
Metadata
Release files for django-synctool 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-synctool-1.1.0.tar.gz | 6.5 kB | Without provenance | Details |
Release files / django-synctool-1.1.0.tar.gz
| Download URL | django-synctool-1.1.0.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d848adbab1817a560aa9da4b819d79e31d1eba7718b6b973bfa12080e52033e5
|
|
BLAKE2b-256 checksum How to use checksums |
333b76457c51dfbffd2e90669d2343d89fbda5024f54fd93123df242a4872fcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-synctool 1.1.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.