===============================
django-import-export-extensions
===============================
.. image:: https://github.com/saritasa-nest/django-import-export-extensions/actions/workflows/checks.yml/badge.svg
:target: https://github.com/saritasa-nest/django-import-export-extensions/actions/workflows/checks.yml
:alt: Build status on Github
.. image:: https://coveralls.io/repos/github/saritasa-nest/django-import-export-extensions/badge.svg?branch=main
:target: https://coveralls.io/github/saritasa-nest/django-import-export-extensions?branch=main
:alt: Test coverage
.. image:: https://img.shields.io/pypi/pyversions/django-import-export-extensions
:target: https://pypi.org/project/django-import-export-extensions/
:alt: Supported python versions
.. image:: https://img.shields.io/badge/django--versions-4.0_%7C_4.1_%7C_4.2_%7C_5.0-blue
:target: https://pypi.org/project/django-import-export-extensions/
:alt: Supported django versions
.. image:: https://readthedocs.org/projects/django-import-export-extensions/badge/?version=latest
:target: https://django-import-export-extensions.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://static.pepy.tech/personalized-badge/django-import-export-extensions?period=month&units=international_system&left_color=gray&right_color=blue&left_text=Downloads/month
:target: https://pepy.tech/project/django-import-export-extensions
:alt: Downloading statistic
Description
-----------
``django-import-export-extensions`` extends the functionality of
`django-import-export <https://github.com/django-import-export/django-import-export/>`_
adding the following features:
* Import/export resources in the background via Celery
* Manage import/export jobs via Django Admin
* DRF integration that allows to work with import/export jobs via API
* Support `drf-spectacular <https://github.com/tfranzel/drf-spectacular>`_ generated API schema
* Additional fields and widgets (FileWidget, IntermediateManyToManyWidget, IntermediateManyToManyField)
Installation
------------
To install ``django-import-export-extensions``, run this command in your terminal:
.. code-block:: console
$ pip install django-import-export-extensions
Add ``import_export`` and ``import_export_extensions`` to ``INSTALLED_APPS``
.. code-block:: python
# settings.py
INSTALLED_APPS = (
...,
"import_export",
"import_export_extensions",
)
Run ``migrate`` command to create ImportJob/ExportJob models and
``collectstatic`` to let Django collect package static files to use in the admin.
.. code-block:: shell
$ python manage.py migrate
$ python manage.py collectstatic
Usage
-----
Prepare resource for your model
.. code-block:: python
# apps/books/resources.py
from import_export_extensions.resources import CeleryModelResource
from .. import models
class BookResource(CeleryModelResource):
class Meta:
model = models.Book
Use ``CeleryImportExportMixin`` class and set ``resource_class`` in admin model
to import/export via Django Admin
.. code-block:: python
# apps/books/admin.py
from django.contrib import admin
from import_export_extensions.admin import CeleryImportExportMixin
from .. import resources
@admin.register(models.Book)
class BookAdmin(CeleryImportExportMixin, admin.ModelAdmin):
resource_class = resources.BookResource
Prepare view sets to import/export via API
.. code-block:: python
# apps/books/api/views.py
from .. import resources
from import_export_extensions.api import views
class BookExportViewSet(views.ExportJobViewSet):
resource_class = resources.BookResource
class BookImportViewSet(views.ImportJobViewSet):
resource_class = resources.BookResource
Don't forget to `configure Celery <https://docs.celeryq.dev/en/stable/django/first-steps-with-django.html>`_
if you want to run import/export in background
Links:
------
* Documentation: https://django-import-export-extensions.readthedocs.io.
* GitHub: https://github.com/saritasa-nest/django-import-export-extensions/
* PyPI: https://pypi.org/project/django-import-export-extensions/
License:
--------
* Free software: MIT license
Raw data
{
"_id": null,
"home_page": "https://github.com/saritasa-nest/django-import-export-extensions",
"name": "django-import-export-extensions",
"maintainer": "Nikita Azanov",
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": "nikita.azanov@saritasa.com",
"keywords": "python, json, django, csv, xlsx, celery, import_export, django_import_export_extensions",
"author": "Saritasa",
"author_email": "pypi@saritasa.com",
"download_url": "https://files.pythonhosted.org/packages/26/7a/fa50e7b7357bdba658b44266e2f92201c603567fb9cb29666585f84c96b6/django_import_export_extensions-0.7.0.tar.gz",
"platform": null,
"description": "===============================\ndjango-import-export-extensions\n===============================\n\n.. image:: https://github.com/saritasa-nest/django-import-export-extensions/actions/workflows/checks.yml/badge.svg\n :target: https://github.com/saritasa-nest/django-import-export-extensions/actions/workflows/checks.yml\n :alt: Build status on Github\n\n.. image:: https://coveralls.io/repos/github/saritasa-nest/django-import-export-extensions/badge.svg?branch=main\n :target: https://coveralls.io/github/saritasa-nest/django-import-export-extensions?branch=main\n :alt: Test coverage\n\n.. image:: https://img.shields.io/pypi/pyversions/django-import-export-extensions\n :target: https://pypi.org/project/django-import-export-extensions/\n :alt: Supported python versions\n\n.. image:: https://img.shields.io/badge/django--versions-4.0_%7C_4.1_%7C_4.2_%7C_5.0-blue\n :target: https://pypi.org/project/django-import-export-extensions/\n :alt: Supported django versions\n\n.. image:: https://readthedocs.org/projects/django-import-export-extensions/badge/?version=latest\n :target: https://django-import-export-extensions.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://static.pepy.tech/personalized-badge/django-import-export-extensions?period=month&units=international_system&left_color=gray&right_color=blue&left_text=Downloads/month\n :target: https://pepy.tech/project/django-import-export-extensions\n :alt: Downloading statistic\n\nDescription\n-----------\n``django-import-export-extensions`` extends the functionality of\n`django-import-export <https://github.com/django-import-export/django-import-export/>`_\nadding the following features:\n\n* Import/export resources in the background via Celery\n* Manage import/export jobs via Django Admin\n* DRF integration that allows to work with import/export jobs via API\n* Support `drf-spectacular <https://github.com/tfranzel/drf-spectacular>`_ generated API schema\n* Additional fields and widgets (FileWidget, IntermediateManyToManyWidget, IntermediateManyToManyField)\n\nInstallation\n------------\n\nTo install ``django-import-export-extensions``, run this command in your terminal:\n\n.. code-block:: console\n\n $ pip install django-import-export-extensions\n\nAdd ``import_export`` and ``import_export_extensions`` to ``INSTALLED_APPS``\n\n.. code-block:: python\n\n # settings.py\n INSTALLED_APPS = (\n ...,\n \"import_export\",\n \"import_export_extensions\",\n )\n\nRun ``migrate`` command to create ImportJob/ExportJob models and\n``collectstatic`` to let Django collect package static files to use in the admin.\n\n.. code-block:: shell\n\n $ python manage.py migrate\n $ python manage.py collectstatic\n\n\nUsage\n-----\n\nPrepare resource for your model\n\n.. code-block:: python\n\n # apps/books/resources.py\n from import_export_extensions.resources import CeleryModelResource\n\n from .. import models\n\n\n class BookResource(CeleryModelResource):\n\n class Meta:\n model = models.Book\n\nUse ``CeleryImportExportMixin`` class and set ``resource_class`` in admin model\nto import/export via Django Admin\n\n.. code-block:: python\n\n # apps/books/admin.py\n from django.contrib import admin\n\n from import_export_extensions.admin import CeleryImportExportMixin\n\n from .. import resources\n\n\n @admin.register(models.Book)\n class BookAdmin(CeleryImportExportMixin, admin.ModelAdmin):\n resource_class = resources.BookResource\n\n\nPrepare view sets to import/export via API\n\n.. code-block:: python\n\n # apps/books/api/views.py\n from .. import resources\n\n from import_export_extensions.api import views\n\n\n class BookExportViewSet(views.ExportJobViewSet):\n resource_class = resources.BookResource\n\n\n class BookImportViewSet(views.ImportJobViewSet):\n resource_class = resources.BookResource\n\n\nDon't forget to `configure Celery <https://docs.celeryq.dev/en/stable/django/first-steps-with-django.html>`_\nif you want to run import/export in background\n\n\nLinks:\n------\n* Documentation: https://django-import-export-extensions.readthedocs.io.\n* GitHub: https://github.com/saritasa-nest/django-import-export-extensions/\n* PyPI: https://pypi.org/project/django-import-export-extensions/\n\nLicense:\n--------\n* Free software: MIT license\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Extend functionality of `django-import-export`",
"version": "0.7.0",
"project_urls": {
"Documentation": "https://django-import-export-extensions.readthedocs.io",
"Homepage": "https://github.com/saritasa-nest/django-import-export-extensions",
"Repository": "https://github.com/saritasa-nest/django-import-export-extensions"
},
"split_keywords": [
"python",
" json",
" django",
" csv",
" xlsx",
" celery",
" import_export",
" django_import_export_extensions"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3e7189ecbbc294807f09d549ee6e26bb3c5df026040279d9fec1608298567665",
"md5": "3fa9b6a2b73d6015756aa1f2390ee38b",
"sha256": "7c020eca6e7e546786b2b880df356bc4ba3b079c4b9ea015b40d478c267f38fc"
},
"downloads": -1,
"filename": "django_import_export_extensions-0.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3fa9b6a2b73d6015756aa1f2390ee38b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 67919,
"upload_time": "2024-10-29T02:53:57",
"upload_time_iso_8601": "2024-10-29T02:53:57.181461Z",
"url": "https://files.pythonhosted.org/packages/3e/71/89ecbbc294807f09d549ee6e26bb3c5df026040279d9fec1608298567665/django_import_export_extensions-0.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "267afa50e7b7357bdba658b44266e2f92201c603567fb9cb29666585f84c96b6",
"md5": "0b5812f3a8c373ca367f80ffa9a772a5",
"sha256": "e5a6029cf548589e2b05ed1a7d200f4e8103916d709741bceee9c5d5fdcd425d"
},
"downloads": -1,
"filename": "django_import_export_extensions-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "0b5812f3a8c373ca367f80ffa9a772a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 45965,
"upload_time": "2024-10-29T02:53:58",
"upload_time_iso_8601": "2024-10-29T02:53:58.935962Z",
"url": "https://files.pythonhosted.org/packages/26/7a/fa50e7b7357bdba658b44266e2f92201c603567fb9cb29666585f84c96b6/django_import_export_extensions-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-29 02:53:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "saritasa-nest",
"github_project": "django-import-export-extensions",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-import-export-extensions"
}