An XLSX spreadsheet renderer for Django REST Framework.

Overview

Django REST Framework Renderer: XLSX

drf-renderer-xlsx provides an XLSX renderer for Django REST Framework. It uses OpenPyXL to create the spreadsheet and returns the data.

Requirements

It may work with earlier versions, but has been tested with the following:

  • Python >= 3.6
  • Django >= 2.2
  • Django REST Framework >= 3.6
  • OpenPyXL >= 2.4

Installation

pip install drf-renderer-xlsx

Then add the following to your REST_FRAMEWORK settings:

    REST_FRAMEWORK = {
        ...

        'DEFAULT_RENDERER_CLASSES': (
            'rest_framework.renderers.JSONRenderer',
            'rest_framework.renderers.BrowsableAPIRenderer',
            'drf_renderer_xlsx.renderers.XLSXRenderer',
        ),
    }

To avoid having a file streamed without a filename (which the browser will often default to the filename "download", with no extension), we need to use a mixin to override the Content-Disposition header. If no filename is provided, it will default to export.xlsx. For example:

from rest_framework.viewsets import ReadOnlyModelViewSet
from drf_renderer_xlsx.mixins import XLSXFileMixin
from drf_renderer_xlsx.renderers import XLSXRenderer

from .models import MyExampleModel
from .serializers import MyExampleSerializer

class MyExampleViewSet(XLSXFileMixin, ReadOnlyModelViewSet):
    queryset = MyExampleModel.objects.all()
    serializer_class = MyExampleSerializer
    renderer_classes = (XLSXRenderer,)
    filename = 'my_export.xlsx'

The XLSXFileMixin also provides a get_filename() method which can be overridden, if you prefer to provide a filename programmatically instead of the filename attribute.

Configuring Styles

Styles can be added to your worksheet header, column header row, and body rows, from view attributes header, column_header, body. Any arguments from the OpenPyXL package can be used for font, alignment, fill and border_side (border will always be all side of cell).

class MyExampleViewSet(XLSXFileMixin, ReadOnlyModelViewSet):
    queryset = MyExampleModel.objects.all()
    serializer_class = MyExampleSerializer
    renderer_classes = (XLSXRenderer,)

    column_header = {
        'titles': [
            "Column_1_name",
            "Column_2_name",
            "Column_3_name",
        ],
        'column_width': [17, 30, 17],
        'height': 25,
        'style': {
            'fill': {
                'fill_type': 'solid',
                'start_color': 'FFCCFFCC',
            },
            'alignment': {
                'horizontal': 'center',
                'vertical': 'center',
                'wrapText': True,
                'shrink_to_fit': True,
            },
            'border_side': {
                'border_style': 'thin',
                'color': 'FF000000',
            },
            'font': {
                'name': 'Arial',
                'size': 14,
                'bold': True,
                'color': 'FF000000',
            },
        },
    }
    body = {
        'style': {
            'fill': {
                'fill_type': 'solid',
                'start_color': 'FFCCFFCC',
            },
            'alignment': {
                'horizontal': 'center',
                'vertical': 'center',
                'wrapText': True,
                'shrink_to_fit': True,
            },
            'border_side': {
                'border_style': 'thin',
                'color': 'FF000000',
            },
            'font': {
                'name': 'Arial',
                'size': 14,
                'bold': False,
                'color': 'FF000000',
            }
        },
        'height': 40,
    }

Also you can dynamically generate style attributes in methods get_body, get_header, get_column_header.

def get_header(self):
    starttime, endtime = parse_times(request=self.request)
    datetime_format = "%H:%M:%S %d.%m.%Y"
    return {
        'tab_title': 'MyReport',
        'header_title': 'Report from {} to {}'.format(
            starttime.strftime(datetime_format),
            endtime.strftime(datetime_format),
        ),
        'height': 45,
        'img': 'app/images/MyLogo.png',
        'style': {
            'fill': {
                'fill_type': 'solid',
                'start_color': 'FFFFFFFF',
            },
            'alignment': {
                'horizontal': 'center',
                'vertical': 'center',
                'wrapText': True,
                'shrink_to_fit': True,
            },
            'border_side': {
                'border_style': 'thin',
                'color': 'FF000000',
            },
            'font': {
                'name': 'Arial',
                'size': 16,
                'bold': True,
                'color': 'FF000000',
            }
        }
    }

Also you can add color field to your serializer and fill body rows.

class ExampleSerializer(serializers.Serializer):
    color = serializers.SerializerMethodField()

    def get_color(self, instance):
        color_map = {'w': 'FFFFFFCC', 'a': 'FFFFCCCC'}
        return color_map.get(instance.alarm_level, 'FFFFFFFF')

Controlling XLSX headers and values

Use Serializer Field labels as header names

By default, headers will use the same 'names' as they are returned by the API. This can be changed by setting xlsx_use_labels = True inside your API View.

Instead of using the field names, the export will use the labels as they are defined inside your Serializer. A serializer field defined as title = serializers.CharField(label=_("Some title")) would return Some title instead of title, also supporting translations. If no label is set, it will fall back to using title.

Ignore fields

By default, all fields are exported, but you might want to exclude some fields from your export. To do so, you can set an array with fields you want to exclude: xlsx_ignore_headers = [ ] .

This also works with nested fields, separated with a dot (i.e. icon.url).

Name boolean values

True and False as values for boolean fields are not always the best representation and don't support translation. This can be controlled with xlsx_boolean_labels.

xlsx_boolean_labels = {True: _('Yes'), False: _('No')} will replace True with Yes and False with No.

Format dates

To format dates differently than what DRF returns (eg. 2013-01-29T12:34:56.000000Z) xlsx_date_format_mappings takes a ´dict` with the field name as its key and the date(time) format as its value:

xlsx_date_format_mappings = {
    'created_at': '%d.%m.%Y %H:%M',
    'updated_at': '%d.%m.%Y %H:%M'
}

Custom mappings

Assuming you have a field that returns a dict instead of a simple str, you might not want to return the whole object but only a value of it. Let's say status returns { value: 1, display: 'Active' }. To return the display value in the status column, we can do this:

xlsx_custom_mappings = {
    'status': 'display'
}

A probably more common case is that you want to change how a value is formatted. xlsx_custom_mappings also takes functions as values. Assuming we have a field description, and for some strange reason want to reverse the text, we can do this:

def reverse_text(val):
    return val[::-1]

xlsx_custom_mappings = {
    'description': reverse_text
}

Release Notes

Release notes are available on GitHub.

Maintainer

We are looking for someone to help be a maintainer! This involves reviewing Pull Requests and releasing new versions. If you use this package frequently and are interested in helping, please open an issue to let me know.

This package is maintained by the staff of Wharton Research Data Services. We are thrilled that The Wharton School allows us a certain amount of time to contribute to open-source projects. We add features as they are necessary for our projects, and try to keep up with Issues and Pull Requests as best we can. Due to constraints of time (our full time jobs!), Feature Requests without a Pull Request may not be implemented, but we are always open to new ideas and grateful for contributions and our package users.

Contributors (Thank You!)

Comments
  • Added support for global date formats and fixed drf date formats not supported

    Added support for global date formats and fixed drf date formats not supported

    #49 Changes:

    • added field dictionary to check field types more easily
    • added global date format settings
    • added support for rest framework date formats

    This was a bit more complicated than I originally thought because the data is already formatted by drf, and because we needed to know the field type (couldn't rely on the type since it was a str).

    I realized the current version would break when using drf's DATETIME_FORMAT, DATE_FORMAT or TIME_FORMAT because parse_datetime() and parse_date() could not parse non-iso formats.

    Take a look and let me know what you think.

    Also what should the settings be name and where should they be? I went with DRF_RENDERER_XLSX_ prefix in global django settings:

    • DRF_RENDERER_XLSX_DATETIME_FORMAT
    • DRF_RENDERER_XLSX_DATE_FORMAT
    • DRF_RENDERER_XLSX_TIME_FORMAT

    Another option would be to stick these settings inside REST_FRAMEWORK = {} instead?

    opened by rptmat57 23
  • Escape possible malicious chars

    Escape possible malicious chars

    a case of CSV injections have become public/popular in mainstream media here. This PR sanitizes field values by prepending ' in front of possible malicious code. xlsx readers handle these values as strings Tested with MS Excel, Numbers and LibreOffice.

    ESCAPE_CHARS are taken from https://owasp.org/www-community/attacks/CSV_Injection

    opened by willtho89 5
  • Remove usage of depreciated NullBooleanField for drf 3.14.0

    Remove usage of depreciated NullBooleanField for drf 3.14.0

    There is a new drf release https://www.django-rest-framework.org/community/release-notes/#3140 Here NullBooleanField is no longer available and so I removed the one reference to allow support for drf 3.14.0

    It was also not required as the isinstance(field, BooleanField) would return true for a NullBooleanFIeld due to object inheritance:

    >>> from rest_framework.fields import NullBooleanField
    >>> field = NullBooleanField()
    >>> from rest_framework.fields import BooleanField
    >>> isinstance(field, BooleanField)
    True
    >>> 
    

    So I think we should be good :+1:

    Thank you for the package :heart: @FlipperPA

    opened by sarahboyce 4
  • NESTED: using a nested GET api/serializer writes only headers, fields are empty - fix in PR #36

    NESTED: using a nested GET api/serializer writes only headers, fields are empty - fix in PR #36

    there is already a fix, a PR (#36) opened by @paveloder

    I have applied the fix locally and I can confirm it works.

    My API was returning:

    HTTP 200 OK
    Allow: GET
    Content-Type: application/json
    Vary: Accept
    
    [
        {
            "id": 1,
            "rfid_tag": {
                "id": 1,
                "number": "1234567890",
                "product": {
                    "id": 1,
                    "name": "Prosop mare",
                    "ean": "11111",
                    "description": "",
                    "category": 1,
                    "info": []
                },
                "status": "I",
                "info": []
            },
            "security_location": 1,
            "aknowledged": false
        },
        {
            "id": 2,
            "rfid_tag": {
                "id": 2,
                "number": "1234567891",
                "product": {
                    "id": 1,
                    "name": "Prosop mare",
                    "ean": "11111",
                    "description": "",
                    "category": 1,
                    "info": []
                },
                "status": "I",
                "info": []
            },
            "security_location": 2,
            "aknowledged": false
        }
    ]
    
    • viewset
    class SecurityEventsGetXLSXViewset(XLSXFileMixin, ReadOnlyModelViewSet):
        """ Generate XLSX File """
        queryset = models.SecurityEvents.objects.all()
        serializer_class = serializers.SecurityEventsGetSerializer
        renderer_classes = (XLSXRenderer,)
        filename = 'SecurityEventsGet_export.xlsx'
    
    • serializer
    class SecurityEventsGetSerializer(serializers.ModelSerializer):
        rfid_tag = RfidTagNestedSerializer()
        class Meta:
            model = models.SecurityEvents
            fields = ['id', 'rfid_tag', 'security_location', 'aknowledged']
            read_only_fields = ['created_at']
    

    Before PR #36 patch

    Screenshot 2021-06-22 at 15 02 21

    After PR #36 patch

    Screenshot 2021-06-22 at 15 02 30
    opened by ionescu77 4
  • Add `get_filename` method

    Add `get_filename` method

    Would it make sense to mirror how most of the DRF & Django's CBVs work by having a get_ method for get_filename that would allow a user to dynamically set the filename when using the XLSXFileMixin?

    Maybe as simple as:

    def get_filename(self):
        return self.filename
    
    opened by notanumber 4
  • Added iterables in flatten to item list

    Added iterables in flatten to item list

    From my viewpoint it's required to return lists also as a separated list.

    If possible please take the change to next release so that i can use it via pip in my project :-)

    opened by frruit 4
  • Wrong data type for cells

    Wrong data type for cells

    My serializer returns type-reach content:

    OrderedDict([('link', u'https://yandex.com'), ('name', u'name'), ('num', 123), ('post_date', datetime.datetime(2018, 11, 5, 17, 12, 42)), ('num2', 1.23), ('in_my_network', False)])
    

    But in resulting XLSX all these cells are strings. E.g. '123

    I didn't find in documentation any way to specify that given cell is integer / float / data / boolean.

    opened by askoretskiy 4
  • Set correct media type

    Set correct media type

    according to https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types application/vnd.openxmlformats-officedocument.spreadsheetml.sheet should be used. Closes #60

    opened by willtho89 3
  • fixes a bug that caused loss of ancestor of parent field in _flatten_…

    fixes a bug that caused loss of ancestor of parent field in _flatten_…

    Fixes a problem that happened while flattening headers from nested serialisers. Example response:

    {
       "address": {
          "client": {
             "name": "foo",
             "id": 1
       }
    }
    

    Renderer put only client.name and client.id to header names. And returned empty data for those fields. This PR fixes this.

    opened by paveloder 3
  • Fixed bugs when serialising nested serializers

    Fixed bugs when serialising nested serializers

    When serialising, we iterate through the headers we find in the first result:

    elif isinstance(results, ReturnList) or type(results) is list:
      column_names_first_row = self._flatten(results[0])
    

    Let's say the response looks like this:

    {
      results: [
        {
          title: 'Example 1',
          some_relation: {
            id: 1,
            title: 'I am a relation'
          },
          some_value: 100
        },
        {
          title: 'Example 2',
          some_relation: null,
          some_value: 200
        }
      ]
    }
    

    This will lead to the headers title, some_relation.id, some_relation.title, some_value. While this works for the first result, the second row will have less values and therefore shift some_value to the left, ending up in the column of some_relation.title, with the one most right being empty.

    A second problem would be when the second result in the example would actually be the first. In that case we would end up with incomplete headers.

    I changed the flattening to use the serializer instead and iterate through all header keys for each result, to keep the correct order and not end up with shifted values.

    I also added a property xlsx_use_labels that uses field labels instead of keys.

    Update 25.03.2021:

    Since this PR is still not merged or responded to, and I needed to add more functionality based on this commit, this is much more than a bugfix now:

    # set xlsx_use_labels = True inside API view to enable labels
    use_labels = getattr(drf_view, 'xlsx_use_labels', False)
    
    # A list of header keys to ignore in our export
    self.ignore_headers = getattr(drf_view, 'xlsx_ignore_headers', [])
    
    # set dict named xlsx_use_labels inside API View. i.e. { True: 'Yes', False: 'No' }
    self.boolean_display = getattr(drf_view, 'xlsx_boolean_labels', None)
    
    # set dict named xlsx_date_format_mappings with headers as keys and formatting as value. i.e. { 'created_at': '%d.%m.%Y, %H:%M' }
    self.date_format_mappings = getattr(drf_view, 'xlsx_date_format_mappings', None)
    
    # Map a specific key to a column (i.e. if the field returns a json) or pass a function to format the value
    # Example with key: { 'custom_choice': 'custom_choice.display' }, showing 'display' in the 'custom_choice' col
    # Example with function { 'custom_choice': custom_func }, passing the value of 'custom_choice' to 'custom_func', allowing for formatting logic
    self.custom_mappings = getattr(drf_view, 'xlsx_custom_mappings', None)
    
    opened by Shin-- 3
  • Can't download Excel file

    Can't download Excel file

    Hi guys!

    I try to download Excel file but i can't. After send a request I've got some trash in response and I can't download file. Do I need to define download method?

    Here is my view and serializer:

    class ReportViewSet(XLSXFileMixin, viewsets.ReadOnlyModelViewSet):
        queryset = models.Item.objects.all()
        serializer_class = serializers.ReportSerializer
        renderer_classes = (XLSXRenderer,)
        filename = 'report.xlsx'
    
        column_header = {
            'titles': [
                "Column_1_name",
                "Column_2_name",
                "Column_3_name",
            ]
    
    class ReportSerializer(serializers.Serializer):
        color = serializers.SerializerMethodField()
    
        def get_color(self, instance):
            color_map = {'w': 'FFFFFFCC', 'a': 'FFFFCCCC'}
            return color_map.get(instance.name, 'FFFFFFFF')
    

    Thank you in advance!

    opened by smuglik 3
  • Should XLSXListField Support Nullable Values?

    Should XLSXListField Support Nullable Values?

    Currently XLSXListField does not behave very nicely if prepping a value of None. This field corresponds to DRF's ListField, which does support allow_null=True.

        def prep_value(self) -> Any:
    >       if len(self.value) > 0 and isinstance(self.value[0], Iterable):
    E       TypeError: object of type 'NoneType' has no len()
    

    It seems as though this field should nicely handle null (None) values. Happy to open a PR if folks agree.

    opened by thomasmatecki 1
  • Feature Request: Support nested arrays

    Feature Request: Support nested arrays

    I work a lot with related fields which are 1-M, and currently anything that is an array of objects just gets the whole child json dumped into one field.

    It would be nice to have some further "flatification" in one way or another

    I can imagine two sensible ways to do this nonsense I'm describing:

    • 1NF table: "left-join"ing all the columns into one massive table)
    • 2NF multiple sheets: a sheet per every key which holds an array, and dropping just the "row" references back into the "parent"
    help wanted 
    opened by jvacek 2
  • Validation check problem with custom exceptions

    Validation check problem with custom exceptions

    There is a problem occuring with the validation checker. The current one:

    def _check_validatation_data(self, data):
            detail_key = "detail"  
            if detail_key in data:  
                return False  
            return True
    

    checks only for 'detail' inside the data and this creates a problem when a custom exception handling exists or even if some response actually has the key "detail" inside.

    Proposal: Validate via the response status code. If it is in the range of HTTP 2xx it's True.

    opened by char-pap 0
  • ValueError: Cannot convert UUID('some_uuid') to Excel

    ValueError: Cannot convert UUID('some_uuid') to Excel

    I have a model with column UUID id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)

    So when I use it as render class:

    renderer_classes = (XLSXRenderer, ) I get: ValueError: Cannot convert UUID('my_uuid') to Excel

    opened by yurabysaha 0
  • Include multiple sheet tags in the same Excel

    Include multiple sheet tags in the same Excel

    This is a very useful package, but I encountered a small problem in use. Can we use it to include multiple sheet tags in the same Excel, and can set header information, etc.

    opened by BrianWang1990 2
Releases(2.2.0)
  • 2.2.0(Sep 30, 2022)

    What's Changed

    • Removed NullBooleanField, and requires Django REST Framework 3.14 or higher. For older versions of DRF, use version 2.1.0. By @sarahboyce in https://github.com/wharton/drf-excel/pull/65
    • Better Unicode character support by @suhanoves in https://github.com/wharton/drf-excel/pull/64 and @moyechen in https://github.com/wharton/drf-excel/pull/63
    • Use the correct media type by @willtho89 in https://github.com/wharton/drf-excel/pull/62

    Full Changelog: https://github.com/wharton/drf-excel/compare/2.1.0...2.2.0

    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Mar 7, 2022)

    What's Changed

    • Support was added for sheet view options, such as rightToLeft and showGridLines by @rptmat57 in https://github.com/wharton/drf-renderer-xlsx/pull/50
    • README typos were fixed by @DanielJDufour and @rptmat57

    Full Changelog: https://github.com/wharton/drf-excel/compare/2.0.1...2.1.0

    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Feb 24, 2022)

    What's Changed

    • Bug fix: allow_null source arguments in issue https://github.com/wharton/drf-excel/issues/55 fixed by PR https://github.com/wharton/drf-excel/pull/56
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Feb 22, 2022)

    What's Changed

    • Support was added for column data styles and global date, time, and datetime formats @rptmat57 in https://github.com/wharton/drf-renderer-xlsx/pull/50
      • This is a breaking change for anyone who was using xlsx_date_format_mappings; please update to use column_data_styles
    • Typos were fixed by @runningzyp in https://github.com/wharton/drf-renderer-xlsx/pull/52

    column_data_styles example

    This new features allows for flexible styling at the column level:

    column_data_styles = {
        'distance': {
            'alignment': {
                'horizontal': 'right',
                'vertical': 'top',
            },
            'format': '0.00E+00'
        },
        'created_at': {
            'format': '%d.%m.%Y %H:%M',
        }
    }
    

    New Contributors

    • @runningzyp made their first contribution in https://github.com/wharton/drf-renderer-xlsx/pull/52

    Full Changelog: https://github.com/wharton/drf-excel/compare/1.0.0...2.0.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Feb 18, 2022)

    What's Changed

    • 1.0.0 release! We're moving to Semantic Versioning to improve communication for future breaking changes.
    • New name: drf-excel is the new package name, which is less obtuse than the previous package name.
    • TL;DR upgrade path: replace drf_renderer_xlsx in your code with drf_excel. Otherwise, the class names and renderer paths are remaining the same.
    Source code(tar.gz)
    Source code(zip)
  • 0.4.5(Feb 15, 2022)

    What's Changed

    • Fixed issue with flattening non-string arrays by @rptmat57 in https://github.com/wharton/drf-renderer-xlsx/pull/47
    • Support DateField for xlsx_date_format_mappings by @vincenz-e in https://github.com/wharton/drf-renderer-xlsx/pull/48

    New Contributors

    • @rptmat57 made their first contribution in https://github.com/wharton/drf-renderer-xlsx/pull/47
    • @vincenz-e made their first contribution in https://github.com/wharton/drf-renderer-xlsx/pull/48

    Full Changelog: https://github.com/wharton/drf-renderer-xlsx/compare/0.4.4...0.4.5

    Source code(tar.gz)
    Source code(zip)
  • 0.4.4(Dec 13, 2021)

    What's Changed

    • feat: split table_title and header_title by @runningzyp in https://github.com/wharton/drf-renderer-xlsx/pull/43

    New Contributors

    • @runningzyp made their first contribution in https://github.com/wharton/drf-renderer-xlsx/pull/43

    Full Changelog: https://github.com/wharton/drf-renderer-xlsx/compare/0.4.3...0.4.4

    Source code(tar.gz)
    Source code(zip)
  • 0.4.3(Nov 9, 2021)

  • 0.4.1(Jul 12, 2021)

    • Support for nested serializers has been improved and expanded.
    • Properly flattens headers from nested serializers.
    • Proper escaping for possible malicious characters.
    • Only checks list or dict types during the render process.
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Mar 26, 2021)

  • 0.3.9(Dec 29, 2020)

  • 0.3.8(Sep 21, 2020)

  • 0.3.7(Jan 18, 2020)

    0.3.7

    • Better logic for flattening lists within cells. Bug fix for ViewSets with other actions, only applying to Response instances.

    0.3.6

    • Check to ensure lists have length before flattening.

    0.3.5

    • Add the get_filename method to allow programmatically naming the downloaded spreadsheet file.

    0.3.4

    • Switch to setuptools_scm. Add support for ReturnDict in addition to ReturnList.

    0.3.3

    • Add support for nested arrays, flattening them into a string: value1, value2, value3, etc.

    0.3.2

    • Add supported for nested values; flattens sub-values into sub.value1, sub.value2, sub.value3, etc.

    0.3.1

    • Fix an error when an empty result set was returned from the endpoint. Now, it will properly just download an empty spreadsheet.
    • Remove an errant format() function which was removing typing from the spreadsheet.

    0.3.0

    • Add support for custom spreadsheet styles (thanks, Pavel Bryantsev!)
    • Add an attribute for setting the download filename instead of export.xlsx per view.
    Source code(tar.gz)
    Source code(zip)
Owner
The Wharton School
The Wharton School at the University of Pennsylvania
The Wharton School
Simple spectra visualization tool for astronomers

SpecViewer A simple visualization tool for astronomers. Dependencies Python = 3.7.4 PyQt5 = 5.15.4 pyqtgraph == 0.10.0 numpy = 1.19.4 How to use py

5 Oct 07, 2021
Painlessly create beautiful matplotlib plots.

Announcement Thank you to everyone who has used prettyplotlib and made it what it is today! Unfortunately, I no longer have the bandwidth to maintain

Olga Botvinnik 1.6k Jan 06, 2023
Investment and risk technologies maintained by Fortitudo Technologies.

Fortitudo Technologies Open Source This package allows you to freely explore open-source implementations of some of our fundamental technologies under

Fortitudo Technologies 11 Dec 14, 2022
🎨 Python Echarts Plotting Library

pyecharts Python ❤️ ECharts = pyecharts English README 📣 简介 Apache ECharts (incubating) 是一个由百度开源的数据可视化,凭借着良好的交互性,精巧的图表设计,得到了众多开发者的认可。而 Python 是一门富有表达

pyecharts 13.1k Jan 03, 2023
Personal IMDB Graphs with Bokeh

Personal IMDB Graphs with Bokeh Do you like watching movies and also rate all of them in IMDB? Would you like to look at your IMDB stats based on your

2 Dec 15, 2021
An open-source tool for visual and modular block programing in python

PyFlow PyFlow is an open-source tool for modular visual programing in python ! Although for now the tool is in Beta and features are coming in bit by

1.1k Jan 06, 2023
A D3.js plugin that produces flame graphs from hierarchical data.

d3-flame-graph A D3.js plugin that produces flame graphs from hierarchical data. If you don't know what flame graphs are, check Brendan Gregg's post.

Martin Spier 740 Dec 29, 2022
Set of matplotlib operations that are not trivial

Matplotlib Snippets This repository contains a set of matplotlib operations that are not trivial. Histograms Histogram with bins adapted to log scale

Raphael Meudec 1 Nov 15, 2021
Realtime Web Apps and Dashboards for Python and R

H2O Wave Realtime Web Apps and Dashboards for Python and R New! R Language API Build and control Wave dashboards using R! New! Easily integrate AI/ML

H2O.ai 3.4k Jan 06, 2023
Import, visualize, and analyze SpiderFoot OSINT data in Neo4j, a graph database

SpiderFoot Neo4j Tools Import, visualize, and analyze SpiderFoot OSINT data in Neo4j, a graph database Step 1: Installation NOTE: This installs the sf

Black Lantern Security 42 Dec 26, 2022
Python code for solving 3D structural problems using the finite element method

3DFEM Python 3D finite element code This python code allows for solving 3D structural problems using the finite element method. New features will be a

Rémi Capillon 6 Sep 29, 2022
I'm doing Genuary, an aritifiacilly generated month to build code that make beautiful things

Genuary 2022 I'm doing Genuary, an aritifiacilly generated month to build code that make beautiful things. Every day there is a new prompt for making

Joaquín Feltes 1 Jan 10, 2022
Simple, realtime visualization of neural network training performance.

pastalog Simple, realtime visualization server for training neural networks. Use with Lasagne, Keras, Tensorflow, Torch, Theano, and basically everyth

Rewon Child 416 Dec 29, 2022
阴阳师后台全平台(使用网易 MuMu 模拟器)辅助。支持御魂,觉醒,御灵,结界突破,秘闻副本,地域鬼王。

阴阳师后台全平台辅助 Python 版本:Python 3.8.3 模拟器:网易 MuMu | 雷电模拟器 模拟器分辨率:1024*576 显卡渲染模式:兼容(OpenGL) 兼容 Windows 系统和 MacOS 系统 思路: 利用 adb 截图后,使用 opencv 找图找色,模拟点击。使用

简讯 27 Jul 09, 2022
Graphing communities on Twitch.tv in a visually intuitive way

VisualizingTwitchCommunities This project maps communities of streamers on Twitch.tv based on shared viewership. The data is collected from the Twitch

Kiran Gershenfeld 312 Jan 07, 2023
The Python ensemble sampling toolkit for affine-invariant MCMC

emcee The Python ensemble sampling toolkit for affine-invariant MCMC emcee is a stable, well tested Python implementation of the affine-invariant ense

Dan Foreman-Mackey 1.3k Jan 04, 2023
A little word cloud generator in Python

Linux macOS Windows PyPI word_cloud A little word cloud generator in Python. Read more about it on the blog post or the website. The code is tested ag

Andreas Mueller 9.2k Dec 30, 2022
Color maps for POV-Ray v3.7 from the Plasma, Inferno, Magma and Viridis color maps in Python's Matplotlib

POV-Ray-color-maps Color maps for POV-Ray v3.7 from the Plasma, Inferno, Magma and Viridis color maps in Python's Matplotlib. The include file Color_M

Tor Olav Kristensen 1 Apr 05, 2022
Here I plotted data for the average test scores across schools and class sizes across school districts.

HW_02 Here I plotted data for the average test scores across schools and class sizes across school districts. Average Test Score by Race This graph re

7 Oct 27, 2021
LabGraph is a a Python-first framework used to build sophisticated research systems with real-time streaming, graph API, and parallelism.

LabGraph is a a Python-first framework used to build sophisticated research systems with real-time streaming, graph API, and parallelism.

MLH Fellowship 7 Oct 05, 2022