drf-renderer-xlsx | XLSX spreadsheet renderer for Django REST | Data Visualization library

 by   wharton Python Version: 0.4.0 License: Non-SPDX

kandi X-RAY | drf-renderer-xlsx Summary

kandi X-RAY | drf-renderer-xlsx Summary

drf-renderer-xlsx is a Python library typically used in Analytics, Data Visualization applications. drf-renderer-xlsx has no bugs, it has no vulnerabilities, it has build file available and it has low support. However drf-renderer-xlsx has a Non-SPDX License. You can install using 'pip install drf-renderer-xlsx' or download it from GitHub, PyPI.

An XLSX spreadsheet renderer for Django REST Framework.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              drf-renderer-xlsx has a low active ecosystem.
              It has 71 star(s) with 15 fork(s). There are 7 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 8 open issues and 8 have been closed. On average issues are closed in 41 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of drf-renderer-xlsx is 0.4.0

            kandi-Quality Quality

              drf-renderer-xlsx has 0 bugs and 4 code smells.

            kandi-Security Security

              drf-renderer-xlsx has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              drf-renderer-xlsx code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              drf-renderer-xlsx has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              drf-renderer-xlsx releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              drf-renderer-xlsx saves you 78 person hours of effort in developing the same functionality from scratch.
              It has 282 lines of code, 11 functions and 4 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed drf-renderer-xlsx and discovered the below as its top functions. This is intended to give you an instant insight into drf-renderer-xlsx implemented functionality, and help decide if they suit your requirements.
            • Render a report .
            • Flattens the serializer s fields .
            • Flattens the data into a nested list .
            • Create a named style from a dictionary .
            • Get the value of a property from a given object .
            • Add the filename to the response .
            • Get filename .
            Get all kandi verified functions for this library.

            drf-renderer-xlsx Key Features

            No Key Features are available at this moment for drf-renderer-xlsx.

            drf-renderer-xlsx Examples and Code Snippets

            Configuring Styles
            Pythondot img1Lines of Code : 101dot img1License : Non-SPDX (NOASSERTION)
            copy iconCopy
            class MyExampleViewSet(XLSXFileMixin, ReadOnlyModelViewSet):
                queryset = MyExampleModel.objects.all()
                serializer_class = MyExampleSerializer
                renderer_classes = (XLSXRenderer,)
            
                column_header = {
                    'titles': [
                        "Column_  
            Installation
            Pythondot img2Lines of Code : 22dot img2License : Non-SPDX (NOASSERTION)
            copy iconCopy
            pip install drf-renderer-xlsx
            
                REST_FRAMEWORK = {
                    ...
            
                    'DEFAULT_RENDERER_CLASSES': (
                        'rest_framework.renderers.JSONRenderer',
                        'rest_framework.renderers.BrowsableAPIRenderer',
                        'drf_renderer_xlsx.  
            Controlling XLSX headers and values,Custom mappings
            Pythondot img3Lines of Code : 9dot img3License : Non-SPDX (NOASSERTION)
            copy iconCopy
            xlsx_custom_mappings = {
                'status': 'display'
            }
            
            def reverse_text(val):
                return val[::-1]
            
            xlsx_custom_mappings = {
                'description': reverse_text
            }
              

            Community Discussions

            Trending Discussions on drf-renderer-xlsx

            QUESTION

            Django rest framework XLSX renderer + Apiview
            Asked 2021-Jan-23 at 23:59

            I'm setting up an endpoint on my API which should return a XLSX-file. The DRF-docs mention https://github.com/wharton/drf-renderer-xlsx as the main external rendering package, aside from the pandas which also seem to be able to render XLSX.

            In their code example they use a ReadOnlyViewset paired with a mixin, but there is no mention of how it's used with APIViews. Still, I would like to use an APIView as shown by this https://harshahegde.dev/rendering-xlsx-files-in-django-rest-framework-ckagk293p00eumks1bf4dlhie However.. This works great when using CURL or Postman, but when done through a browser I get this error:

            ...

            ANSWER

            Answered 2021-Jan-23 at 23:59

            Looking at the mixin code it became clear they change the content-disposition header, and so since the DRF Response() takes a header argument I tried changing it, and it worked perfectly.

            Source https://stackoverflow.com/questions/65865390

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install drf-renderer-xlsx

            Then add the following to your REST_FRAMEWORK settings:.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/wharton/drf-renderer-xlsx.git

          • CLI

            gh repo clone wharton/drf-renderer-xlsx

          • sshUrl

            git@github.com:wharton/drf-renderer-xlsx.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link