Skip to main content

django-data-import-management

Django data import management application.

Install

pip install django-data-import-management

Usage

pro/settings.py

INSTALLED_APPS = [
    ...
    'django_data_import_management',
    'example_app',
    ...
]

example_app/import_workflow.py

from django_data_import_management.models import DjangoDataImportWorkflow
from django_data_import_management.models import ParsedItem

class ExampleImportWorkflow(DjangoDataImportWorkflow):

    def do_parse(self):
        items = []
        for i in range(10):
            item = ParsedItem()
            info = str(i)
            data = {
                "index": 1,
            }
            item.mark_success(info, data)
            items.append(item)
        return items        # Note: always return the parsed ParsedItems
    
    def do_import(self, import_items):
        for item in import_items:
            item.mark_success()
        return import_items   # Note: always return import_items

example_app/apps.py

class ExampleAppConfig(AppConfig):
    name = 'example_app'

    def ready(self):
        from django_data_import_management.models import register_django_data_import_workflow
        from .import_workflows import ExampleImportWorkflow
        register_django_data_import_workflow("Example Import", ExampleImportWorkflow)

example_app/init.py

default_app_config = "example_app.apps.ExampleAppConfig"

Steps:

  1. Setup dependencies.
  2. Create a new workflow.
  3. Register the workflow when project starts.

Releases

v0.1.4

  • First release.

v0.1.5

  • Pass datafile instance to workflow.

v0.1.6

  • Add DjangoSimpleExportedDataImportWorkflow base class.

v0.1.8

  • Fix string format problem.
  • Fix fk problem.

v0.1.9

  • Fix dependence package version problem.

v0.2.0

  • Fix ugettext problem for Django 4.2.x.
  • Add do_parse and do_import object toolbar button.

v0.2.1

  • Doc update.

Metadata

Release files for django-data-import-management 0.2.1

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-data-import-management 0.2.1
File Size Uploaded Provenance Actions
django-data-import-management-0.2.1.tar.gz 16.5 kB Without provenance Details for django-data-import-management-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-data-import-management 0.2.1
File Interpreter ABI Platform Actions
django_data_import_management-0.2.1-py3-none-any.whl Python 3 none any Details for django_data_import_management-0.2.1-py3-none-any.whl

Total release size: 37.8 kB

Release files / django-data-import-management-0.2.1.tar.gz

Download URL django-data-import-management-0.2.1.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5e66164885b01f106ef2bafd31a0fc3fe2cab29f44d96399270a76721bb4b9d9
BLAKE2b-256 checksum
How to use checksums
0b8c7032619208a0a5c67922688285eaa0762b7236d95de6fa0d078945edb2cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / django_data_import_management-0.2.1-py3-none-any.whl

Download URL django_data_import_management-0.2.1-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee2357f4b772e5a9d4a202187f6306e0619c39f51e12f4516c880e43de6eccee
BLAKE2b-256 checksum
How to use checksums
620a71d774cb32bd4fc7d0b2149bbebaf5bad0c017a29dcd1544189c213973a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for django-data-import-management 0.2.1

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